I'm building Portlets using Spring Portlet MVC 3.02 and deploying them on WebSphere Portal V7. I have a form submission where one combo box requires to sent an Spanish character. Something like this:
<form:select id="${ns}imTheField" path="imTheField" cssStyle="width:120px;">
<option value="AtTheEndTheresASpanishCharacterÑ">
AtTheEndTheresASpanishCharacterÑ
</option>
</form:select>
The "Ñ" character looks nice in the Screen. That combo value maps to the command attribute imTheField
by Spring Binding process. After form submission and in the handler method, this is what I get when I log that command attribute:
theCommand.getImTheField: AtTheEndTheresASpanishCharacterÃ
Which is not the character that came from the form. This is getting me trouble as when there are errors in form submission I have to show the form again with the previous values, which now I don't have because of that issue.
Any ideas? This is what I get from Chrome debugging at form submission:
Request Headers
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:es
Form Data
imTheField:AtTheEndTheresASpanishCharacterÑ
Response Headers
Content-Language:es
Content-Type:text/html; charset=UTF-8
Note that the field imTheField
looks nicely formatted. Maybe is an issue with the Accept-Charset
request header?