• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I convert a unicode back into Chinese ?

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can I convert a unicode back into Chinese ?

if I have a unicode "\ufffd\u04b5\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u057c\ufffd", so how could I convert it back into Chinese and printout ?

I have tried Sun example,

String original = new String("\u013f\u00bc");

It doesn't work.

And below is my charset.
-------
[java] Big5
[java] Big5-HKSCS
[java] GB18030
[java] GBK
[java] US-ASCII
[java] UTF-16
[java] UTF-16BE
[java] UTF-16LE
[java] UTF-8
.....
-------

Thanks
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried having a look at the following ? Perhaps they could be of some help.

method: String.toBytes(String encoding)

constructor: String(byte[]bytes, String encoding)

There's also class java.io.Charset, but I haven't had a chance to try it out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!