Skip to content

Commit

Permalink
pylightning - allow unicode symbols in the description to be passed a…
Browse files Browse the repository at this point in the history
…s-is to the daemon

addresses issue #2753.

Formatting the JSON with the default parameters will escape the unicode
symbols in a way that c-lightning won't allow, leading to an exception.
  • Loading branch information
jarret committed Sep 2, 2019
1 parent 0495295 commit e218836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/pylightning/lightning/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, socket_path, executor=None, logger=logging, encoder_cls=json.
self.next_id = 0

def _writeobj(self, sock, obj):
s = json.dumps(obj, cls=self.encoder_cls)
s = json.dumps(obj, ensure_ascii=False, cls=self.encoder_cls)
sock.sendall(bytearray(s, 'UTF-8'))

def _readobj(self, sock, buff=b''):
Expand Down

0 comments on commit e218836

Please sign in to comment.