I need to use utf-8 on my form. The JSP shows non-ascii characters well, but when I get back into my action I can't get the values from my attributes on utf-8. I'm sure the problem is only on the form, because I can get utf-8 strings from my resources file and display it properly. For example:
14:33:57,312 INFO [STDOUT] 43 - Siguiente subcategor��a - Siguiente subcategor�a
Where I get the text before the '-' from my form, and the text after from my resources file.
I think that "multipart/form-data: charset=utf-8" is not a valid enctype; the encoding can't be specified in this way. Generally, the browser will use whatever encoding the page was delivered in. So if the contentType is UTF-8, then it should use UTF-8 for the form submission.
To make this explicit you can use the "accept-charset" form attribute. At least, that's what the HTML standard says how it should happen. [ June 24, 2008: Message edited by: Ulf Dittmer ]
@Merrill: ask my boss, it's one of the requirements...
The JSP has now these lines:
But the data from the form keeps "Siguiente subcategor��a" instead of "Siguiente subcategor�a". I've tried with other html:form attributes, but simply can't avoid this error. Any idea there? Is there another way to define the encoding?