i am trying to display and update simplified chines(GB2312) charset using base64 , Base64 to GB2312 is working fine but i am not able convert GB2312 to base64
String str="17DP5Mqxx+vFxNXV";
Base64 base64=new Base64();
String gb2312=new String(base64.decode(str.getBytes()),"GB2312");
System.out.println("GB2312 = "+gb2312);
String baseString=new String(base64.encode(gb2312.getBytes()));
System.out.println("Base64 = "+baseString);
Aactual result is
GB2312 = 装箱时请拍照
Base64 =6KOF566x5pe26K+35ouN54Wn
Expected result is
GB2312 = 装箱时请拍照
Base64 = 17DP5Mqxx+vFxNXV