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
> >
> > 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
>
> > 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
> > 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,
> 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
> 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?
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
> 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
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