• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confused with unicode

 
Simeon Shi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
why the code followed output the '?' character
**************************
char a = 823;
System.out.println(a);
**************************
but i tried another block of code;
System.out.println((int)'?');
the output is 63 which is the same as ASCII.
why?
3x in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably because the display you were looking at only supports ASCII and not a complete Unicode font set.
 
Simeon Shi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, that hit the point
thanks a ton!
Simeon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic