Results 1 to 4 of 4
  1. #1
    rishu2003 is offline Member
    Join Date
    Mar 2011
    Posts
    7
    Rep Power
    0

    Default regarding rupee unicode

    can any one temme how to declare rupee symbol unicode in java !!
    i found the unicode U+20B9 but to declare it!

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    What do you mean "declare" it?

    20B9 is just a number (in decimal, 8377). Use it however you want: assign it to a char variable or whatever.

  3. #3
    rishu2003 is offline Member
    Join Date
    Mar 2011
    Posts
    7
    Rep Power
    0

    Default

    instead of rs i wanna use rupee symbol how can i do it !! i found the unicode !


    char half = '\u20B9';
    but still i cant get the symbol !

    wat shuld i do ?

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Make sure your computer has (and uses) fonts that have a Rupee symbol.

    I'm in New Zealand and using a Windows computer: so all I see is a ? when I print that character from a command line application. I would expect other operating systems (like Linux) to have shells that work properly.

    But, again, you need to say what "still I can't get the symbol" actually means. For instance, I tried the following code and only saw a question mark after it was compiled and run without error:

    Java Code:
    public class Foo {
    	public static void main(String[] args) {
    		char rupeeCh = '\u20B9';
    		
    		System.out.printf("%d is %c%n", (int)rupeeCh, rupeeCh);
    	}
    }

    If this SSCCE is your problem, others with experience in your locale might be able to say how it is typically dealt with.

Similar Threads

  1. Help in Unicode
    By justbeller in forum NetBeans
    Replies: 0
    Last Post: 01-29-2011, 06:43 PM
  2. wat is the unicode of '?' ? 63 or 128
    By Jagdeesh123 in forum New To Java
    Replies: 1
    Last Post: 12-09-2010, 08:49 AM
  3. Unicode(UTF-8) to PDF
    By karasatishkumar in forum Advanced Java
    Replies: 0
    Last Post: 03-24-2010, 10:59 AM
  4. Lucene with unicode
    By goms in forum Lucene
    Replies: 1
    Last Post: 02-02-2010, 01:20 PM
  5. SWT 2D Unicode Example
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 06-28-2008, 09:21 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
  •