You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Novotny <no...@aei.mpg.de> on 2004/06/27 13:58:58 UTC
UTF-8 character encoding and Tomcat 5.0.25
Hi,
In upgrading my webapp from Tomcat 4.1.X to Tomcat 5.0.25, it seems
UTF-8 character encoding no longer works as it did before. I've already
read and followed advice from the Tomcat FAQ
http://jakarta.apache.org/tomcat/faq/tomcatuser.html and read the bug
reports related to this problem with no clues.
Here's what I've done so far:
1) Add a filter which does the request.setCharacterEncoding("UTF-8");
2) Use res.setContentType("text/html; charset=utf-8"); and
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=utf-8\"/>");
in my servlet when creating the html page to be output
3) Add <%@ page contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" %>
to the top of JSP files containing strings to be localized
What else could I missing? What I would like to know is why is it
possible for my code to work fine on Tomcat 4 but not Tomcat 5-- it
would seem either something is in fact broken, or instructions need to
be updated on adding some bit of information that wasn't necessary before.
Thanks, Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org