i have two chinese words "果然有问题", which is encoded in GB3212. However, it is wrongly encoded into ANSI and become "彆衄恀枙". With hex editor, it is B9FBC8BBD3D0CECACCE2
I would like to use java to correct the charset and store it to UTF-16.
So, I try to:
String wrongstr = "彆衄恀枙";
byte[] binary = wrongstr.getBytes("BIG5");
System.out.printf("%s", new String(binary, "GB2312"));
but what I get is: 果?有问题</p>
I used Notepad++ and can see the correct word. I cannot use getBytes("BIG5") or getBytes("US_ANSI") or r.getBytes("GB2312") to get the correct hex (B9FBC8BBD3D0CECACCE2)
I dont know what is wrong. Please help, thanks in advance.