Home » questions » How to convert Unicode representation into actual characters in Java?
How to convert Unicode representation into actual characters in Java?
Hello.
I have a Java string, e.g. "\u08aaa", representing the UTF-8 hex
code for the character 說. How do I convert this
string into the actual character 說?
I've tried:
String utfCode = "\u08aaa";
byte[] b = utfCode.getBytes();
String actualCharacter = new String(b, "UTF-8");
and all sorts of other similar operations, but none of them have
worked. Is such a conversion possible in Java? Plz help me to resolve this.
Thanks,
Ravi K.

Answers
Ed
On 2006-08-03 07:34:13