Hello, I found that the library does not support Chinese in use. I can't receive it correctly when receiving Chinese. In the read_next_message(self) function, str() should be used instead of chr() when decoding.
decoded = bytearray() for char in self.read_bytes(payload_length): char ^= masks[len(decoded) % 4] decoded.append(char) decoded = str(decoded, encoding="utf-8") self.server._message_received_(self, decoded)
Hello, I found that the library does not support Chinese in use. I can't receive it correctly when receiving Chinese. In the read_next_message(self) function, str() should be used instead of chr() when decoding.
decoded = bytearray() for char in self.read_bytes(payload_length): char ^= masks[len(decoded) % 4] decoded.append(char) decoded = str(decoded, encoding="utf-8") self.server._message_received_(self, decoded)