View Single Post
  (#1 (permalink)) Old
Aegis1888 Aegis1888 is offline
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jul 2009
Default Displaying The Correct Glyph - 07-02-2009, 10:24 AM

Hi Guys,

I have a problem. I'm trying to display the glyph for "£" from its string literal which is "& # 1 6 3 ;". I've got two strings

Code:
	String a = "£";
	String b = "& # 1 6 3 ;";
and I output the values to the console;

Code:
       System.out.println(a);
       System.out.println(b);
String a comes out as "£" but String b is not converted to the same glyph. Why doesn't eclipse do this when the editor for this post does?

NOTE: that the string "& # 1 6 3 ;" should not have spaces in between the characters, but it was the only way I could display the String without the editor converting it to the £ glyph.
Reply With Quote