A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
JSP Chinese characters scrambled even in UTF-8
Joined: Mar 13, 2007
Aug 28, 2012 07:43:55
Chinese characters scrambled even in UTF-8 encoding set in my jsp pages.I use Struts2 framework.I set the encoding as follows.
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
In my Struts2 action,I added the lines for each field to which i assign Chinese characters,they are
Even I set the encoding as above,It works temporarily till i trigger the next action and the chinese characters were
scrambled and appear in the jsp as peculiar characters.
How i can i get the same chinese characters when page control navigates from one page to another page.
Thanks for your suggestion.
Joined: Jul 23, 2008
Aug 28, 2012 22:00:55
Hi Ramesh ,
Try using setcharacterencoding filter in front of the struts2. please refer the thread attached here it will give you the better idea.
I have implemented i18n with japanese in jsp
but didnt find any issues its working good so basically there something which is changing the encoding for request.
Refer this thread which will be helpful to you.
It is sorta covered in the
JavaRanch Style Guide
subject: JSP Chinese characters scrambled even in UTF-8
struts with character encoding problem
Jsp is not displaying in Struts2
Internationalization (specifically with Chinese characters)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015