Re: [Simpleweb-Support] What encoding of String that Request.getParameter() return?
Brought to you by:
niallg
From: Carfield Y. <car...@gm...> - 2005-12-07 10:13:48
|
> > I dont quite understand this? Java Strings are charset-neutral as far > as i know (and always stored internally as UTF-16), so there is no > need to "convert" a string to anything as the string does not retain > charset information. The only conversion is dont at Input/Output > stream level or when encoding to other formats (such as URLEncoder). > In some servlet container (tomcat and jetty as I know) If you submit multibytes character in HTML form, it will incorrectly assume that it is "ISO-8859-1", and return the incorrect encoded string at request.getparameter() method. In order to get back the correct string, I need to do the above. Of course, May be it just because I've setup servlet container incorrectly, but seem to me that this is a very common practice. |