I have a byte array from other system, the string should be mixed with English, Japanese and Chinese characters after encoding it, how can I process it? thanks!
//the byte[] represents "C注ファイル PARM 年月日输入不正确 入力文字列"
byte[] buf = new byte[] { 64, 64, 64, 64, 64, -61, 14, 73, 68, 67, -97,
67, 71, 67, -126, 67, -81, 15, 64, 64, 64, 64, 64, 64, 64, 64,
64, -41, -63, -39, -44, 64, 14, 82, -23, 90, -63, 84, -44, 85,
-29, 84, -22, 73, -70, 91, -98, 84, -74, 15, 64, 64, 64, 64,
64, 64, 64, 64, 64, 14, 70, 101, 69, -9, 69, -54, 72, -14, 75,
-76, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64 };
String japaneseStr = new String(buf,"cp939");// convert to japanese
System.out.println(japaneseStr);//output:" C注ファイル PARM 衷扞唖詑煤証昿翰 入力文字列 "
String chineseStr = new String(buf,"cp935"); // convert to chinese
System.out.println(chineseStr); //output:" C堡ファイル PARM 年月日输入不正确 ㄅ㈦⑹绑兜 "
//"注ファイル" is japanese
//"年月日输入不正确" is chinese
//"入力文字列" is japanese
//i want to get the result is " C注ファイル PARM 年月日输入不正确 入力文字列 "