Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.0
-
None
-
None
Description
Using struts forms to post unicode characters (e.g. german umlauts) results in a String with garbage characters.
I urgently need this to work for my portal, so I tracked down the problem and found it to be specific to Jetspeed.
I logged a JIRA issue for jetspeed, but maybe this problem also exists when using the struts bridge with another portal.
The main cause is decoding request parameters twice in o.a.j.engine.servlet.ServletRequestImpl (line 157):
try
{ paramValues[i] = new String(paramValues[i].getBytes("ISO-8859-1"), getCharacterEncoding()); }catch (UnsupportedEncodingException e)
This is called firstly by jetspeed itself (providing parameters to the StrutsPortlet) and secondly by the Struts RequestProcessor (to populate the form bean). It's clear that this results in garbage characters.
However, I don't think it's a struts bridge bug. For further explanation and a solution for Jetspeed, see JS2-376 (request parameter encoding problem)
Regards, Thorsten