• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

chinese - unicode- xml character reference

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using websphere 5.1 on windows and am trying to do a simple word wrap or line split method.

However when I type chinese on my webpage, the string I get is in xml character reference. So when I find the length of that string its a lot more(155) than the 21 chiniese characters I entered.

在下表中 输入详细参数以明 确您的查找范围

The following is the String I see on debugging.

&# 22312;&# 19979;&# 34920;&# 20013;&# 32;&# 36755;&# 20837;&# 35814;&# 32454;&# 21442;&# 25968;&# 20197;&# 26126;&# 32;&# 30830;&# 24744;&# 30340;&# 26597;&# 25214;&# 33539;&# 22260;
Note : I've added a space between &# and the number so that it displays on the screen
(Use SC Unipad to convert and see the corresponding chinese)

Is there some setting that I am missing on the server, which is causing the chinese characters to be return in this format.

Following are a few settings/code I have made.

1.) JVM parameters for websphere == -Dfile.encoding=UTF-8 -Dclient.encoding.override=UTF-8 -Djava.awt.headless=true

2.) charset set on my jsp pages is UTF-8

[ September 17, 2004: Message edited by: Ram Kumar Subramaniam ]
[ September 17, 2004: Message edited by: Ram Kumar Subramaniam ]
 
Are you here to take over the surface world? Because this tiny ad will stop you!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic