How getParameter of Servlet works ?

Hi,

I have a form submitted to a Servlet. The form is submitted with charset
as UTF-8 (using the meta tag). The Servlet is running within iPlanet
Application Server in Solaris OS. The default charset encoding for the
OS is "C" (which I guess nothing but/equivalent to ISO-8859-1).

My qyery is when I make a getParameter call in the servlet how does it
work internally ? My understanding is browser will send stream of bytes
encoded in UTF-8 to the server. In that case will getParameter
internally create the String (which will be output for the getParametr
method) by converting those bytes (encoded in UTF-8) to string using
ISO-8859-1 as encoding type ?

My observation is when I change the locale of OS to have UTF-8 as
encoding type (say en_US.UTF-8) the String I get is different from the
previous case (i.e. with "C" as locale of OS).

Any explanation/clarification will be highly appreciated.

Regards,
Sourav

Received on Thursday, 4 October 2001 23:19:10 UTC