*
The moose likes Struts and the fly likes Struts 2 - i18n Chinese localization issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 - i18n Chinese localization issue" Watch "Struts 2 - i18n Chinese localization issue" New topic
Author

Struts 2 - i18n Chinese localization issue

Yong Mook Kim
Greenhorn

Joined: Nov 17, 2008
Posts: 6
A properties file without encoded

Struts 2 view page

In this case, the s:textfield, s:password and s:text are able to display the Chinese message correctly, but the s:submit and getText() are just display some garbage characters.


A properties file with data encoded (native2ascii)


The result is totally reverse, now the s:submit and getText() are able to display the Chinese correctly, but failed for s:textfield, s:password and s:text . AR... .

In my testing, the above Struts 2 code is work fine in English like characters : France or German, but only failed in Chinese or Japanese.Any idea or help is greatly appreciated. Thanks.

I created a blog post about to simulate this problem with screen shot and source code attached.
http://www.mkyong.com/struts2/struts-2-chinese-localization-issue/


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Struts 2 - i18n Chinese localization issue
 
Similar Threads
struts2 properties file reload
Showing Hiding <s:div> tag in Struts2
validation problem.
Problem With I18n feature of Struts2
s:url and javascript onclick submit