Thanks Mikolaj.  That did it.

For some reason running request.setCharacterEncoding("UTF-8") in my code does nothing, but if it gets run from a Filter it works great.

Tim Koop



Mikolaj Rydzewski wrote:

Tim Koop wrote:

I have a web page form that is expecting UTF-8 data, but when my code gets the data, the getParameter() methods don't return the right thing. I have to run this code to get the right thing:

String value = new String(request.getParameter("fieldName").getBytes("ISO-8859-1"), "UTF-8");


Please take a look at SetCharacterEncodingFilter servlet in Tomcat's example apps. It does the job you need. Its sources are located in webapps/jsp-examples/WEB-INF/classes/filters (at least in Tomcat 5.5).

Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to