Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Chinese Input

 
lily zou
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, there
If I have a form which has a input field where I want to input Chinese characters and submit to a servlet. The servlet will process the characters and display them again. While the html file where the form sits has set charset to be utf-8 and my browser encode type is utf-8 as well, I always got wrong Chinese characters output.
May I ask what kind of input I should use ? unicode like "\u433c" or any other format ?
Thanks a lot.
Lily
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People have complained about this before with the problems of unicode characters.
One thing is the output have the right type of font available and in use it whcih has these characters? That is a common problem.
If not, I will look into other causes of it for you.
Eric
 
lily zou
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,Eric
The things is that I am not quite sure if the output is the right font. If I check Google site, I input Chinese text in search and submit, the input field will contain the right Chinese text I just input. Also, if I check the web page's source code, all the Chinese text is correctly displayed.
However, in my page, the returned input field will contain wrong Chinese text and the source code I viewed also contains something which cann't be recognized instead of Chinese.
I used some tool to generate Chinese and paste to those input fields. Also , I am using Tomcat4 as my web server.
Lily
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does the output source code look like?
 
lily zou
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
everything is normal except that the Chinese characters are all garbage. ( I used notepad to dipslay the html source code )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic