You know, I had my doubts about whether or not Struts was really actually doing anything with POST request parameters other than just reading them. It did seem to me that it was more of an issue at the Tomcat level since Tomcat is the one serving up the parameters.

After some digging, there's URIEncoding attribute on the Connector element that if not specified defaults to ISO-8859-1 when attempting to decode URI bytes. I suspect setting this to UTF-8, in addition to the other changes we made (the @page directive and <meta> tag directive for the Content-Type, and the acceptCharset attribute on html:form all to UTF-8) will fix the problem...we'll see.

After reading some of the developer comments in the filed bugs, UTF-8 appears to be the only standard on URL encoding, however according to them in 2003, no one really paid attention it - hopefully this is not the case anymore.

Thanks for the reference links.

--adam

Niall Pemberton wrote:
Struts doesn't do anything with the encoding - I imagine if you
accessed the parameter value directly from the request you will see
the same issue. You could try setting the encoding on the request
using the setCharacterEncoding("UTF-8") - but you need to do that
before the request is processed - (either in the request processor in
Struts 1.2.x or inserting a Command into the chain for 1.3.x)

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebI18N5.html

If that doesn't work then I would look at the Servlet Container you're
using - for example Tomcat has the following FAQ:

http://tomcat.apache.org/faq/misc.html#tomcat5CharEncoding

Niall

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

Reply via email to