Displaying Unicode chars
in
Programming Questions
•
3 years ago
Hi everyone. I guess my problem is I am a novice in Java.
I need to read a bunch of codes from a file, and to display the corresponding Unicode characters.
For example: I want to read in "015E" and display the character Ş (unicode 015E)
Yes, you guessed it. I can't get around Unicode escapes! I managed to figure out the following:
The trouble is, when I read the string " backslashu015E" from a file, the escape is transformed into an ordinary backslash character. If I read just "u015E", then how can I add the backslash at the beginning???
I need to read a bunch of codes from a file, and to display the corresponding Unicode characters.
For example: I want to read in "015E" and display the character Ş (unicode 015E)
Yes, you guessed it. I can't get around Unicode escapes! I managed to figure out the following:
- text("backslashu015E",100,100);
- String s="backslashu015E";
text(s,100,100);
- String s="backslashuu015E";
text(s,100,100);
The trouble is, when I read the string " backslashu015E" from a file, the escape is transformed into an ordinary backslash character. If I read just "u015E", then how can I add the backslash at the beginning???
1