-
Bug
-
Resolution: Done
-
Major
-
1.3.0.CR1
-
None
-
None
(Related to UNDERTOW-503 and, I assume, UNDERTOW-523)
To reiterate, XHR2 used with FormData is encoded in utf-8 and doesn't specify charset.
Currently I'm observing this:
- since no charset is specified the form is parsed in iso-8859-1
- servletRequest.getCharacterEncoding() returns null
- and we convert it to utf-8
- servletResponse is encoded in iso-8859-1
- causing the utf-8 strings to be badly encoded
Setting default-encoding in jboss-web.xml creates additional problems:
- form is parsed in default-encoding
- servletRequest.getCharacterEncoding() returns null
- and now we can't tell what the encoding actually is
Even if I could get encoding correctly the response will still be badly encoded since the initial charset isn't set - the response header is Content-Type: text/xml;charset=null. (The header charset is initially set correctly to the default-encoding but it's later overwritten, charsetSet is true but charset is null)