@站长苏飞 目前根据文档调整了退款的 但是返回的说明是乱码的[XML] 纯文本查看 复制代码 <?xml version="1.0" encoding="GB18030"?>
<TX>
<REQUEST_SN>0623112456738386</REQUEST_SN>
<CUST_ID>105000050458091</CUST_ID>
<TX_CODE>5W1004</TX_CODE>
<RETURN_CODE>YBLA02910010</RETURN_CODE>
<RETURN_MSG>����.</RETURN_MSG>
<LANGUAGE>CN</LANGUAGE>
<TX_INFO>
<ORDER_NUM>O202106102316233295434573653</ORDER_NUM>
<PAY_AMOUNT>0.01</PAY_AMOUNT>
<AMOUNT>0.01</AMOUNT>
<REM1></REM1>
<REM2></REM2>
</TX_INFO>
</TX>
然后 在后台各种转utf-8也没办法正常显示文字 百度了很多转换编码的方式 但是始终不理想 想求助下 这个应该怎么转才能正常显示出来,后台代码是这样的 输出的是GB18030编码的 [Java] 纯文本查看 复制代码 Socket socket = new Socket("127.0.0.1", 8083);
BufferedReader ins = new BufferedReader(new InputStreamReader(socket.getInputStream(), "GB18030"));
PrintWriter outs = new PrintWriter(socket.getOutputStream());
outs.print(sRequest);
outs.flush();
socket.shutdownOutput();
String sLine = null;
StringBuffer sb = new StringBuffer();
while((sLine = ins.readLine()) != null){
sb.append(sLine);
}
ins.close();
outs.close();
socket.close();
return sb.toString(); |