JSP JSTL FMT, UTF-8 Unicode and native2ascii
So you need Japanese in a J2EE JSP. You do something like this.
<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<c:if test="${param.locale == 'jp'}"><fmt:setLocale value="jp" scope="session"/></c:if>
<fmt:bundle basename="com.example.Example"/>
<fmt:message key="example" var="example"/>
${example}
And then you use native2ascii from the JDK on a UTF-8 file filled with Japanese. You then add this to a property file. And get garbage when running the JSP. Why ?
Because, and I forget this over and over again, the tool exports escaped UTF-16 two byte pairs by default. What you want is:
native2ascii.exe -encoding UTF-8 Example.properties












