-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rashmi,

Rashmi Rubdi wrote:
> On 6/5/07, Shankar Unni <[EMAIL PROTECTED]> wrote:
>> (the page was already set to character
>> encoding Big5), the encoded value sent in the URL was rather screwy:
>>
>> The original character is (Big5) 0xAE 0x78.
>>
>> The URL sent by IE said "%AEx". (!!)
> 
> Did you also configure the web.xml properly ?
> 
> It should have
> 
> <context-param>
> <param-name>PARAMETER_ENCODING</param-name>
> <param-value>Big5</param-value>
> </context-param>
> 
> Are you setting the request parameter correctly before reading the
> parameter?
> 
> String paramEncoding = application.getInitParameter("PARAMETER_ENCODING");
> request.setCharacterEncoding(paramEncoding);

Shouldn't you use the content-type of the request instead of just
forcing your own content-type? If the browser does not send a MIME type
with the request, then the default is defined to be ISO-8859-1:

"The "charset" parameter is used with some media types to define the
   character set (section 3.4) of the data. When no explicit charset
   parameter is provided by the sender, media subtypes of the "text"
   type are defined to have a default charset value of "ISO-8859-1" when
   received via HTTP. Data in character sets other than "ISO-8859-1" or
   its subsets MUST be labeled with an appropriate charset value. See
   section 3.4.1 for compatibility problems."

(From section 3.7.1 of the HTTP/1.1 spec).

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZqeX9CaO5/Lv0PARAhw2AJ4vRSJG0640jpwwVIrJBlKPx+lSogCgnIj9
GwvHipusYE3VorH1vRFpA18=
=LtK5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to