Hi,

 

We use STRUTS 1.0.2 in one of our extranet application and we need to support 
CHINESE locale as part of the scope.

I used the following steps as Laurie pointed out in the earlier mail, but 
somehow the character set is getting corrupted and we are not getting the right 
result.

Can Laurie, Frank or someone else can point me, where the problem could be?

 

Thanks in advance,

Bala

 

Created dummy.properties in dreamweaver(UTF-8 supported) as

bala1=亲爱的

bala2=非常高兴的通知您被升职为

 

Ran native2ascii dummy.properties ApplicationResources_zh.properties and the 
output is,

bala1=\u00e4\u00ba\u00b2\u00e7\u02c6\u00b1\u00e7\u0161\u201e

bala2=\u00e9\ufffd\u017e\u00e5\u00b8\u00b8\u00e9\u00ab\u02dc\u00e5\u2026\u00b4\u00e7\u0161\u201e\u00e9\u20ac\u0161\u00e7\u0178\u00a5\u00e6\u201a\u00a8\u00e8\u00a2\u00ab\u00e5\ufffd\u2021\u00e8\ufffd\u0152\u00e4\u00b8\u00ba

 

JSP is,

<%@ page contentType="text/html; charset=UTF-8" %>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<%@ page import="java.util.*" %>

<%@ page import="java.text.*" %>

<%@ page import="org.apache.struts.action.*" %>

<%

Locale locale=new Locale("zh", "CN");

session.setAttribute("org.apache.struts.action.LOCALE",locale);

%>

<html:html locale="true">

<head>

</head>

<body>

<bean:message key="bala1"/>

</BODY>

</HTML>

 

Result is,

亲爱的

Reply via email to