[Please note: this is a continuation of a question I posted in the servlet sub-forum. However, the problem is now pin-pointed to the Tomcat implementation: either I'm doing something wrong, or it doesn't comply with the servelt spec...].
I'm having a problem with Tomca'ts implementation of
Here's the details:
I have an html < form > where user should type data in *Chinese*.
The browser (IE6) sends the data in UTF-8 ( server, encoded as UTF-8 ( this encoding is mentioned in my "content-type" as well as in < from accept-charset="UTF-8" > ).
I actually see that the browser sends the data *correctly* (this is a GET, so I can see the encoding)...
On the servlet size, I write:
request.setCharacterEncoding("UTF-8"); String p=request.getParameter("name"); // But this doesn't work...
It seems like request.setCharacterEncoding() simply doesn't work : Tomcat reads the parameters as if they were "latin1" ... I can extract them by forcefully converting back to utf-8, but it's ugly and not portable...
I know you can configure tomcat's < Connector > to use utf-8, but I really don't want to do it ( client has a standard Tomcat installation, and I'm not allowed to touch it).
Am I doing something wrong, or is Tomcat just ignoring the j2ee spec in this point ?
Everybody's invited. Except this tiny ad:
how do I do my own kindle-like thing - without amazon