• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display Chinese character on screen  RSS feed

 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the following codes :
Locale locale = new Locale("zh", "CN");
System.out.println(locale.getDisplayLanguage(Locale.SIMPLIFIED_CHINESE));
System.out.println("\u6253\u5370\u8FC7\u671F\u8BC1\u4E66\u8BB0\u5F55");


When run on command prompt
i get the result


??
???


Because I am using Window XP OS, so I can only install JAVA 6 JDK and JRE. This is my system config.

I have also checked the web,

JDK 6 and JRE 6 Supported Locales

Chinese (Simplified)
China zh_CN

Chinese (Simplified) Singapore
zh_SG(*)

Chinese (Traditional) Hong Kong
zh_HK

Chinese (Traditional) Taiwan
zh_TW

can anyone help with the display of chinese characters on screen ?

Thanks.
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java Chinese
打印过期证书记录
I hope it is nothing rude. That has to do with the capabilities of the command line which is very restricted in the characters it can display. Try this instead, and see what happens:-
javax.swing.JOptionPane.showMessageDialog(null, "\u6253\u5370\u8FC7\u671F\u8BC1\u4E66\u8BB0\u5F55");
 
raymond hsu
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, it works, so now I know it is command window can't display unicode,
thanks Ritchie
 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a pleasure
The Linux terminal I was using has a much better scope of characters it can display.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!