To get the display of UTF-8 characters to work correctly, I added the following to all of our portlet JSP pages:
<%@ page contentType="text/html;charset=UTF-8" %>
We found that JBoss Portal will display UTF-8 characters fine - BUT we have not found a why to submit them correctly in a FORM yet... I am looking for a solution for that now. I have tried adding acceptCharset="UTF-8" to all HTML FORM tags but that hasn't worked. And I have also tried changing the line in the theme index.jsp:
<meta http-equiv="Content-Type" content="text/html" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
But that didn't work either :(
However I say a forum post reply by Julian:
I have tried making these changes as suggested by Julian:
// Set content type response.setContentType(mimeType); response.setCharacterEncoding("UTF-8");
So the pages are showing UTF-8 encoding in both IE and FireFox. This is fine and UTF-8 multi-byte characters are displaying ok.
This image shows that working:
So now I attempt to enter UTF-8 characters in my FORM, the HTML FORM has the following attribute: acceptCharset="UTF-8" this image shows the input form:
As you can see it's working fine allowing you to input the characters.
Now we submit the form. At this point if I check the value of the fields submitted to my bean in the debugger the values are a mess of characters and incorrect :( As can be seen on the next screen shot where we output the submitted characters back to the browser:
Exactly the same web-application, running out of the Jboss Portal (still inside JBoss - but running as a TomCat web-app) works fine and the characters are submitted correctly back to the web-server.
Does anyone have any idea what I need to do in JBoss Portal to fix this?