users@glassfish.java.net

Re: why the default response character encoding must be ISO-8859-1?

From: <glassfish_at_javadesktop.org>
Date: Wed, 18 Mar 2009 20:36:21 PDT

I am Ken--.

Thanks to your quick response. I can specify the charset directive easily but actually all my content are in latin1 encoding so I have to wrap a function to encode all content to utf-8.

str = new String(str.getBytes("iso-8859-1"), "utf-8");

As I said before, my webapps are working under tomcat 6.0.18.

From tomcat web site:
Apache Tomcat 6.x is the current focus of development. It builds upon the improvements made in Tomcat 5.5.x and implements the Servlet 2.5 and JSP 2.1 specifications.

I agreed with you about servlet 2.5.

So, any chance or method to make it work without convert the encoding of my content? Servlet Filter? Those content are get from database resultset, web services and properties files.

Regards,
Ken
[Message sent by forum member 'kentsang' (kentsang)]

http://forums.java.net/jive/thread.jspa?messageID=337842