Hello,
I have problem while displaying of japanese UTF-8 character.
I set response header character encoding to UTF-8 by <%@ page
contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> then I read the
UTF-8 japanese character by following statement
<fmt:bundle basename="com.xxx.myBundle">
<fmt:message key="k1"/>
</fmt:bundle>
Even though i set response character encoding to UTF-8 but when compiler
start executing <fmt:bundle> it automatically chages response character
encoding to 'Shift_JIS' from 'UTF-8' I can notice this by printing response
character encoding before and after <fmt:bundle>. Due to this form is not
displayed properly. I dont have issue with locale, I have only issue with
response character encoding.
Resource bundle contains UTF-8 character
I have followig jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="fmt" prefix="fmt" %>
<html>
<head>
</head>
<%System.out.println("CharacterEncoding before calling fmt =
"+response.getCharacterEncoding() );%>
<fmt:bundle basename="com.xxx.myBundle">
<%System.out.println("CharacterEncoding after calling fmt =
"+response.getCharacterEncoding() );%>
<fmt:message key="k1"/>
</fmt:bundle>
</html>
You can see result o/p to
CharacterEncoding before calling fmt = UTF-8
CharacterEncoding after calling fmt = Shift_JIS
Cheers
ilan
---------------------------------
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.