Results 1 to 2 of 2
  1. #1
    nicnicman is offline Member
    Join Date
    Sep 2012
    Rep Power

    Default \u escape character not working

    Hello all,

    In a java program I'm trying to display the degree symbol (small circle) in the command prompt using println(), but it's not displaying properly. Here is the statement:

    Java Code:
    System.out.println( "\u00b0" );
    Thanks for any suggestions.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: \u escape character not working

    Where are you trying to display it?
    That works (for example) when run in my Eclipse IDE, but will not work if I ran it from the command line. It all depends on what the character set of the displaying tool is.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Pattern: illegal escape character
    By coltx in forum New To Java
    Replies: 6
    Last Post: 01-10-2011, 09:26 PM
  2. ^ Escape character
    By GaBuG in forum Advanced Java
    Replies: 3
    Last Post: 12-31-2010, 01:04 AM
  3. Escape Characters in xml
    By higashij in forum XML
    Replies: 2
    Last Post: 09-23-2010, 08:58 AM
  4. Escape Sequence
    By Punter in forum New To Java
    Replies: 4
    Last Post: 02-10-2009, 07:04 AM
  5. reading text character by character
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-09-2007, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts