struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: Issue with Chinese Charctors
Date Fri, 29 Jun 2012 11:26:41 GMT

this issue was reported a ways back
something to check:0)be sure use a charset which will support your locale (zh) mindful
of DBCS support
1)set locale to chinese e.g. zh2a)use locale specific text properties e.g.
this is going to require a string by string translation for each characterproperty1error1=\u30d7\u30ed\u30d1\u30c6\u30a3
1, \u30a8\u30e9\u30fc 1from Brians blogI started creating a new file using the Notepad editor
on Windows XP . The
file is then saved as type "Unicode Big Endian"
Next, using the native2ascii utility from JDK 1.4 SDK, I use the following
command to convert this file to an ASCII file:
native2ascii -encoding UnicodeBig CustomerResources_zh.ucd
2b)confirm MessageResources are being references by Struts in struts-config.xml e.g.<message-resources
parameter="MessageResources"/> Input and Display considerations:
set IME to properly input chinese characters (keyboard) if im not mistaken windows handles
IME and display under Control-Panel "Region and Language" Browsers have specific procedures
to change display to mandarin e.g.internet explorer, Tools --> Internet Options -->
Languages tab, I
added the language "Chinese (Hong Kong S.A.R.) [zh-HK]"

Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.

 > From:
> Date: Fri, 29 Jun 2012 12:42:17 +0200
> Subject: Re: Issue with Chinese Charctors
> To:
> IIRC there is a way to configure encoding inside
> From the struts side there is also a struts.i18n.encoding properties which
> might be useful.
> Twitter     :
> G+          :
> Linkedin    :
> Maurizio Cucchiara
> On 29 June 2012 12:35, Sathish Kumar <>wrote:
> > Hi,
> >
> > In our struts 2 project, we support Chinese language. While we save Chinese
> > text in forms we see junk characters getting saved.
> >
> > While investigating, we found this link
> >
> >
> >
> > As per this,
> >
> > At the top of the JSP Page, we need to include
> >
> > *<%@ page contentType=”text/html;charset=UTF-8″ %>*
> >
> > Now the issue is, it is only possible with JSP pages. But in our case, we
> > use free marker as our result type.
> >
> > What is the coresponding freemarker sysntax for the above JSP code?
> >
> > Any help here will be greatly helpful to us !!
> >
> > Regards,
> > Sathish Kumar T
> >
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message