My website uses the default ISO-8859-1 encoding, each page is a jsp and runs in the servlet container Apache Tomcat 7.0.30.
e.g
http://www.jthink.net/songkong/jp/support.jsp
But now I have translated some pages to Japanese and therefore need to be encoded in something that supports this charset, Ive gone with UTF-8
By simply adding
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
and changing charset of meta tag
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
to this page it is now rendering correctly in my firefox browser.
http://www.jthink.net/songkong/jp/support.jsp
But the answer to this question How to get UTF-8 working in Java webapps? says I also need a CharFilter, do I need this as well - I'm not clear what it does ? I'd rather not add it, not least because I expect it could break my current ISO-8859-1 pages. My non japanese pages are still encoded as ISO-8859-1 and Im undecided whether to convert these as UTF-8 or leave as they are. I'm also concerned it would break the paypal purchase verification code.
Update
Just realized that my web.xml file already contains a specification of a CharacterEncoding filter to set things UTF-8. I don't remember why I have this or what it actually does or whether I should have it seeing as most of my pages are not UTF-8
<filter>
<filter-name>CharacterEncoding</filter-name>
<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html;charset=UTF-8</mime-type>
</mime-mapping>
</web-app>