I am having trouble transmitting multi-byte characters through page params. The problem appears to be this:
1. The servlet spec defaults URI decoding as ISO-8859-1.
2. Calling request.setCharacterEncoding() changes this default for the body of the message (post params)
3. In Tomcat calling request.setCharacterEncoding() does not change the encoding tomcat uses to decode the url. In order to change the uri encoding the useBodyEncodingForURI=true must be set in tomcat configuration (http://tomcat.apache.org/tomcat-5.5-doc/config/http.html).
4. A seam redirect uses seam.core.Manager.encode() to encode request params which encodes the parameters using UTF-8.
5. So when a multi-byte character is communicated as a page param by default it gets encoded by Seam in UTF-8 and decoded by Tomcat using ISO-8859-1.
How do we fix this? Two options:
1. Change Manager.encode() to use ISO-8859-1 instead of UTF-8 by default.
2. Make everyone who uses tomcat set useBodyEncodingForURI=true in their configuration.
I don't know if tomcat is the only container that doesn't by default URIDecode using the same content type as request.setCharacterEncoding().
I'm leaning towards option #1. Thoughts?