I am using mysql 4.1.15, tomcat5 and struts 1.2.8 and have the following problem:
-the jsp pages are all coded utf8 and declared so via page tag.
-the browser shows that display is utf8 and data is displayed correctly (german umlauts).
-now, then I submit a form these strings are sent to the server as utf8, but [insert guilty app here] encodes them again as utf8, resulting in a string that looks good if I convert it from utf8 to iso8859-1.
"Müller" is encoded as "Müller" (which looks like if it is displayed with browser setting = iso8859-1, but it is utf8)
Any suggestions to solve this problem?
-
Double encoded utf8 characters (3 messages)
- Posted by: Georg Mueller
- Posted on: December 12 2005 10:30 EST
Threaded Messages (3)
- Double encoded utf8 characters by Georg Mueller on December 13 2005 04:46 EST
- Double encoded utf8 characters by Ian Purton on February 23 2006 11:14 EST
- Double encoded utf8 characters by Marina Prikaschikova on December 13 2005 09:15 EST
-
Double encoded utf8 characters[ Go to top ]
- Posted by: Georg Mueller
- Posted on: December 13 2005 04:46 EST
- in response to Georg Mueller
I solved it by adding a servlet filter, which calls request.setCharacterEncoding("UTF-8"). -
Double encoded utf8 characters[ Go to top ]
- Posted by: Ian Purton
- Posted on: February 23 2006 11:14 EST
- in response to Georg Mueller
I solved it by adding a servlet filter, which calls request.setCharacterEncoding("UTF-8").
See here for why it's important to use a filter http://www.jiploo.com/blog/2006/02/struts-utf-8-and-form-submissions.html -
Double encoded utf8 characters[ Go to top ]
- Posted by: Marina Prikaschikova
- Posted on: December 13 2005 09:15 EST
- in response to Georg Mueller
See for example Encoding filter in JSOS:
http://www.servletsuite.com/servlets.htm