File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Unicode characters in command prompt 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 » Java » Beginning Java
Bookmark "Unicode characters in command prompt" Watch "Unicode characters in command prompt" New topic
Author

Unicode characters in command prompt

Nathan Bellinger
Greenhorn

Joined: May 02, 2008
Posts: 1
I need to display the unicode characters for card suit symbols in a non-GUI poker program. I wrote it in notepad and am compiling/running it from command prompt. The current method I have of trying to display them is assigning the \uXXXX unicode escape to a char variable, but it's just displaying as '?'. Is there anything I need to do different?
Help would be greatly appreciated. This is the last thing keeping me from completing this project.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42268
    
  64
Welcome to JavaRanch.

That could be tricky. Many terminals/command line environments can only display ASCII characters, and will show everything else with "?". At the least, you'd need to set it to use a font that contains those characters, since I don't think there's a console/terminal in existence that can mix several fonts in the same line.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unicode characters in command prompt