Hi
  In my JSP page, I want to display the Chinese labels which are 
stored in "labels_zh.properties" 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"); %> 
<html> 
<head> 
<title>Testing i18n</title> 
</head> 
<body> 
<i18n:message key="student.id"/> 
</body> 
</html> 


Thanks
Chandu

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to