You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2007/01/23 17:38:24 UTC

Re: How to get UTF-8 decoded parameters from request - Chinese Characters

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

Jean-Philippe,

PATTUS, Jean-Philippe wrote:
> When i fill my form with chinese characters and i submit() the form,
> on the server side when i read the parameter from my request i get
> "C:/ç›é€‰ç¨‹åº" something like this.

Where do you see this kind of thing?

> On the jsp page when i display the query string
> (document.location.search) i get the correct chinese characters.
> How could i set the encoding parameter to Tomcat ? I have tried to
> add URIEncoding="UTF-8" in my server.xml but it doesn't work.

If the characters re-display correctly in your page after a submit, then
I would say that everything is working correctly.

If you are seeing those funny characters in a log file, then I would
suggest that maybe the tool you are using for viewing your logfile (tail
on UNIX, notepad, whatever) might not understand UTF-8 and/or your
logfile itself is not declared to contain UTF-8 characters.

It might just be a problem with viewing your logs, and it's really
working behind the confusion.

- -chris

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

iD8DBQFFtjoA9CaO5/Lv0PARAp3eAJ92/JdBxyAPi1+gfx5GtFKGBZh8dwCfcafo
SxS951/JigMt0XnvLBdii3U=
=cbo6
-----END PGP SIGNATURE-----

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