/fms_web/src/com/joyintech/business/counter/common/SendUtils.java

//发送报文至核心
byte[] info=Utils.convert(sendMsg);
byte[] bMsg = process(info,ip,port);
message = new String(bMsg, "GBK");--> message = new String(bMsg, "utf-8");

当eclipse发送报文乱码时,在java代码中发送和接收的地方都改成utf-8编码即可

/fms_interf/src/com/joyintech/FmsSaleServer/CommunicateCall/Communicate/SocketServer/SocketServerWork.java、

BufferedReader is = new BufferedReader(new InputStreamReader(socket.getInputStream()),"utf-8");

相关文章:

  • 2022-12-23
  • 2021-06-19
  • 2021-10-07
  • 2021-09-21
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
猜你喜欢
  • 2021-11-10
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
相关资源
相似解决方案