• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to display Chinese Characters

 
sabbir kazi
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my situation, I am reading a XML file (UTF-8) thruh JDOM parser where one of the element is in Chinese. But I can't display the chinese character using System.out.println(). It only displays "?" for a Chinese Character.

Any help will be greatly appreciated.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you have reconfigured it, System.out.println output goes to the console, which in all likelihood can't display Unicode characters.
Capture your output in a file, and open that in a program that has a font that can display Unicode characters (like MS Unicode Arial, if you are on Windows).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!