Browse Source

fix bugs of decode while polling

master
henryorz 7 years ago
parent
commit
9414a990af
  1. 8
      src/main/java/com/corundumstudio/socketio/protocol/PacketDecoder.java

8
src/main/java/com/corundumstudio/socketio/protocol/PacketDecoder.java

@ -63,7 +63,13 @@ public class PacketDecoder {
// skip "d="
packet = packet.substring(2);
}
packet = new String(packet.getBytes(CharsetUtil.ISO_8859_1), CharsetUtil.UTF_8);
/**
* this line will convert some utf-8 characters to "?"
*
* @see https://github.com/mrniko/netty-socketio/issues/515
*/
// packet = new String(packet.getBytes(CharsetUtil.ISO_8859_1), CharsetUtil.UTF_8);
return Unpooled.wrappedBuffer(packet.getBytes(CharsetUtil.UTF_8));
}

Loading…
Cancel
Save