Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread tttye
the byte array into a string which only holds 8 bit ""characters"". Tim - Original Message - From: kevin seguin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 13, 2001 10:02 PM Subject: [tomcat 4] RequestUtil.parseParameters() method > i

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread kevin seguin
> > > > it's also used to parse form data, right? can form data have non > > US-ASCII characters? > > No. Form data uses parseParameters(Map, byte[], String encoding) for that > reason. > ahh... that's what i missed. thanks. > If the thing was memory efficient, the url should still be in byt

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread kevin seguin
> > > what might be an even more relevant question is why convert the string > > to bytes anyways? these bytes just end up in new strings, so why not > > perform the parsing logic on chars rather than bytes? seems like > > unecessary conversions to/from bytes/strings > > Well, there are a

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread Remy Maucherat
> > We use simple byte conversion there because the String which is passed here > > (the query portion of the URL) is supposed to only have US-ASCII characters. > > > > it's also used to parse form data, right? can form data have non > US-ASCII characters? No. Form data uses parseParameters(Map,

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread Remy Maucherat
> what might be an even more relevant question is why convert the string > to bytes anyways? these bytes just end up in new strings, so why not > perform the parsing logic on chars rather than bytes? seems like > unecessary conversions to/from bytes/strings Well, there are a number of opera

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread kevin seguin
> We use simple byte conversion there because the String which is passed here > (the query portion of the URL) is supposed to only have US-ASCII characters. > it's also used to parse form data, right? can form data have non US-ASCII characters?

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread kevin seguin
what might be an even more relevant question is why convert the string to bytes anyways? these bytes just end up in new strings, so why not perform the parsing logic on chars rather than bytes? seems like unecessary conversions to/from bytes/strings -kevin. kevin seguin wrote: > > i just

Re: [tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread Remy Maucherat
> i just happened to be looking through the RequestUtil.parseParameters() > method, and something struck me as odd. since i don't know the history > here, i figured i'd ask someone who does... > > anyway, the method looks something like this: > > public static void parseParameters(Map map, St

[tomcat 4] RequestUtil.parseParameters() method

2001-05-13 Thread kevin seguin
i just happened to be looking through the RequestUtil.parseParameters() method, and something struck me as odd. since i don't know the history here, i figured i'd ask someone who does... anyway, the method looks something like this: public static void parseParameters(Map map, String data, S