Re: [Simpleweb-Support] What encoding of String that Request.getParameter() return?
Brought to you by:
niallg
|
From: Martin N. <mar...@gm...> - 2005-12-07 09:31:42
|
On 12/6/05, Carfield Yim <car...@ca...> wrote:
> I see, then I encounter some strangle problem. I was using this
> approach to convert multibyte charset to UTF-8 to storage:
>
> String newString =3D new String( inString.getBytes("ISO-8859-1") , "UTF-8=
");
>
> But this don't work at simpleweb...
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).
/Martin
|