[
https://jira.jboss.org/jira/browse/JBSEAM-3148?page=com.atlassian.jira.pl...
]
Sanne Grinovero commented on JBSEAM-3148:
-----------------------------------------
We usually use option 3:
3. configure Tomcat to use UTF-8
could be a good hint for Seam docs?
Seam URL encoding UTF-8 conflicts with Tomcat Default ISO-8859-1
----------------------------------------------------------------
Key: JBSEAM-3148
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3148
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.3.CR1
Reporter: Michael Youngstrom
Assignee: Michael Youngstrom
Fix For: 2.0.3.CR2
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?
Mike
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira