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

Rob,

On 11/16/2010 4:31 AM, Rob Gregory wrote:
> I also use a filter to set the following:-
> 
> request.setCharacterEncoding("UTF-8");
> response.setContentType("text/html; charset=UTF-8"); 
> response.setCharacterEncoding("UTF-8");

FWIW, you shouldn't override any character encoding sent by the client.
If there is no encoding, feel free to "default" to UTF-8.

> Within the final html output I always include the following meta tag:-
> <meta http-equiv="Content-Type" content="text/xhtml;
> charset=utf-8"></meta>

This only makes sense if the response is actually in UTF-8. I would
recommend something like this:

<meta http-equiv="Content-Type" content="text/xhtml;
charset={response.characterEncoding}" />

http://wiki.apache.org/tomcat/FAQ/CharacterEncoding

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

iEYEARECAAYFAkzi2RQACgkQ9CaO5/Lv0PBlaQCeOMxcnhPuX4hV/TPHT94+tmaM
oyMAoKR87o0U7voSaQ0OiUg9useP/aGJ
=O2Sy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to