aspose 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39547
    
  27
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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unicode characters in command prompt
 
Similar Threads
Doubt for char in K&B
Printing unicode character
unicode & platform support
retain apostrophe in Collection object
How to display Cyrillic in Java