this issue was reported a ways back http://mail-archives.apache.org/mod_mbox/struts-user/201002.mbox/%3c53ee77ab1002070842x50988007h61fc91dee0239...@mail.gmail.com%3E something to check:0)be sure use a charset which will support your locale (zh)..be mindful of DBCS support 1)set locale to chinese e.g. zh2a)use locale specific text properties e.g. MessageResources_zh.properties 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 MessageResources_zh.properties 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]"
Martin ______________________________________________ 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: mcucchi...@apache.org > Date: Fri, 29 Jun 2012 12:42:17 +0200 > Subject: Re: Issue with Chinese Charctors > To: user@struts.apache.org > > IIRC there is a way to configure encoding inside freemarker.properties. > From the struts side there is also a struts.i18n.encoding properties which > might be useful. > > > Twitter :http://www.twitter.com/m_cucchiara > G+ :https://plus.google.com/107903711540963855921 > Linkedin :http://www.linkedin.com/in/mauriziocucchiara > > Maurizio Cucchiara > > > On 29 June 2012 12:35, Sathish Kumar > <sathishkumar.thiyagara...@gmail.com>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 > > > > http://www.mkyong.com/struts2/struts-2-chinese-localization-issue/ > > > > 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 > >