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

Shankar,

Shankar Unni wrote:
> One odd thing we noticed was that when we sent in a single (two-byte)
> Big5 character in a form field (the page was already set to character
> encoding Big5), the encoded value sent in the URL was rather screwy:

This is probably because URLs should be decoded using UTF-8 or
ISO-8859-1 instead of "Big5". Even if the content-type of the request or
response body is Big5, then URL ought to be UTF-8 or ISO-8859-1.

> However, Tomcat actually returns the correct single chinese character
> from "request.getParameter("userid")".
> 
> Is it doing the URL decoding in a different way than Java's built-in URL
> decoder?

Yes, it's using either UTF-8 or ISO-8859-1 to decode the URL parameters
(you can set this in your Connector's configuration) instead of "Big5",
which you were manually choosing when you used Java's URLDecoder.

Hope that helps.

- -chris

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

iD8DBQFGZe6L9CaO5/Lv0PARAv/7AJwNeZyp39F5N/zYpIUyRK/tyL8HggCgrzU8
hPaSFVlAop0gngQLs2dDsJA=
=3oPF
-----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