I had some problems reading and writing UTF-8 from servlets on Tomcat 6 / Linux. the request and response were utf-8, the browser was utf-8, URIEncoding was installed in server.xml on both sockets and hosts. In short, every known thing for me is in the code itself, and the server configuration is utf-8.
When reading the request, I had to take a byte array from String, and then convert that byte array to String again. When writing a request, I had to write bytes, not String itself, to get the correct answer (otherwise, I get an exception saying that some character is not ASCII is not valid ISO 8859-1).
source
share