Merge pull request #47 from Vodalys/unicode
Support unicode data in emit
This commit is contained in:
commit
01f166db1e
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,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)
|
||||||
self._log(logging.DEBUG, '[packet sent] %s', packet_text)
|
self._log(logging.DEBUG, '[packet sent] %s', packet_text)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue