aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Chinese Input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Chinese Input " Watch "Chinese Input " New topic
Author

Chinese Input

lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jan 15, 2002
Posts: 50
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
what does the output source code look like?
lily zou
Ranch Hand

Joined: Jan 15, 2002
Posts: 50
everything is normal except that the Chinese characters are all garbage. ( I used notepad to dipslay the html source code )
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Chinese Input