Unicode - character printing probelm
I'm trying to get character "2936" printed out ( it is the arrow on your big Enter of the keyboard) as seen in Unicode charts Supplemental Arrows B . However it does show as question mark. Suggestions?
public class PrintCharacters
{
public static void main(String[] args)
{
String[] one = {"\u002e", ",","?","\u0021", "'", "@",":",";","\u002f","(",")","1","\u2936"};
for(int i = 0; i < one.length; i++)
{
System.out.println(one[i]);
}
}
}
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
Hi,
I think it is because you don't have the correct fonts intstalled. It is the same thing with
"\u0626" (which is an arabic character if I'm not misstaken).
Try to find and install some language pack including the required font.
di2daer
Junior Poster in Training
66 posts since Sep 2008
Reputation Points: 22
Solved Threads: 13
The above code was just an example, I'm trying to display this character on mobile device, however it does not work either, it is coming as square shape. I may replace the character with a word, graphic or just simply not to provide the option. Well will wait and see anyone will come up with something else...
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
The square shape indicates that the font was not found. If it is a mobile device you need the correct fonts to be installed otherwise the symbols won't display.
Try to read a webpage containing chinese characters, it will mostly display squares.
Please correct me if I'm wrong :)
Check this: http://www.pccl.demon.co.uk/java/unicode.html . I'm not sure what unicode support you need.
di2daer
Junior Poster in Training
66 posts since Sep 2008
Reputation Points: 22
Solved Threads: 13