This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41089
    
  44
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
 
Similar Threads
How to display Cyrillic in Java
Doubt for char in K&B
unicode & platform support
Printing unicode character
retain apostrophe in Collection object