tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramachandra Sankuratri <>
Subject i18n - chinese characters displayed incorrectly
Date Thu, 29 Nov 2001 00:44:31 GMT
  In my JSP page, I want to display the Chinese labels which are 
stored in "" file. I copied the "gb2312" chinese
characters into notepad and saved the file in "utf-8" format.

First I set the locale to "CHINA" which sets the charset to  "GB2312". 
The resulting JSP displays the chinese characters incorrectly.

So I set the content  type explicitly to utf-8 immediately after the
locale, but this does not help.

What I suspect is that the data is stored in "utf-8" format but the tag
<i18n:message> tries to read it in "gb2312" format which results in the
incorrect display.

Am I doing something wrong !!!

Any solutions for the above problem.

Below is the JSP code.

<%@taglib uri="/WEB-INF/i18n.tld" prefix="i18n" %> 
<i18n:bundle baseName="labels" locale="<%= Locale.CHINA %>"/> 
<% response.setHeader("Content-Type", "text/html; charset=utf-8"); %> 
<title>Testing i18n</title> 
<i18n:message key=""/> 


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message