Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading chinese characters through java input fields

 
selva nayagam.K
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All

I need to read chinese character through java input fields. I have installed chinese in my system and I have set system locale to chines. I could type chinese character using
US key board in notepad. When type in my application I get only the english character. How to make java input fields to read chinese character. Please help me out. Thanks in advance.

Regards.
Selva.
 
Dan Lingard
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I guess your application takes input via JSPs?

1) Are you using Windows? You may find that the input has changed from Chinese to English when you change applications (check the language bar settings).

2) Can you copy and paste the Chinese from notepad into your input field?

3) Do you have the correct page encoding set? You should probably have the charset set to UTF-8 on your JSP page.
 
selva nayagam.K
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Dan,

Thank you for the past reply.

I am working with java swing

My system is Windows XP. Input does not changed English it remains as Chinese (Even I have removed english in control panel and checked)

I can copy and paste chines from notepad to input field

Regards,
Selva.




 
Dan Lingard
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Selva,

I'm afraid I can't help you, as I don't really use swing in my line of work.

I think you'll have more luck posting in the Swing / AWT / SWT / JFace section of the forums, rather than the JSP section.

Dan
 
Shashank Ag
Ranch Hand
Posts: 88
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably need to set chinese locale in the very main method from which swing application starts.
 
Liu Xing
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shashank Ag wrote:You probably need to set chinese locale in the very main method from which swing application starts.

Yes. I think so.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic