tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilanchezhian ganesamurthy <>
Subject Problem with <fmt:bundle>
Date Wed, 22 Mar 2006 09:43:46 GMT
  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
  <fmt:bundle basename="">
      <fmt:message key="k1"/>
  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" %>
    <%System.out.println("CharacterEncoding before calling fmt = "+response.getCharacterEncoding()
<fmt:bundle basename="">
  <%System.out.println("CharacterEncoding after calling fmt = "+response.getCharacterEncoding()
    <fmt:message key="k1"/>
  You can see result o/p to 
  CharacterEncoding before calling fmt = UTF-8
  CharacterEncoding after calling fmt = Shift_JIS

 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message