Force packets encoding to utf-8
This commit is contained in:
parent
2e2496cd4c
commit
6a5a35d84d
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ class _AbstractTransport(object):
|
||||||
|
|
||||||
def send_packet(self, code, path='', data='', callback=None):
|
def send_packet(self, code, path='', data='', callback=None):
|
||||||
packet_id = self.set_ack_callback(callback) if callback else ''
|
packet_id = self.set_ack_callback(callback) if callback else ''
|
||||||
packet_parts = str(code), packet_id, path, data
|
packet_parts = str(code), packet_id, path, unicode(data).encode('utf-8')
|
||||||
packet_text = ':'.join(packet_parts)
|
packet_text = ':'.join(packet_parts)
|
||||||
self.send(packet_text)
|
self.send(packet_text)
|
||||||
_log.debug('[packet sent] %s', packet_text)
|
_log.debug('[packet sent] %s', packet_text)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue