From be39aaa31046ac56794334ece6de4b4098633926 Mon Sep 17 00:00:00 2001 From: toyg Date: Sat, 18 Jan 2014 16:25:09 +0000 Subject: [PATCH] fixed unicode serialisation --- bitcoinrpc/authproxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoinrpc/authproxy.py b/bitcoinrpc/authproxy.py index 2914477..e7f626e 100644 --- a/bitcoinrpc/authproxy.py +++ b/bitcoinrpc/authproxy.py @@ -104,7 +104,7 @@ def __call__(self, *args): postdata = json.dumps({'version': '1.1', 'method': self.__service_name, 'params': args, - 'id': self.__id_count}) + 'id': self.__id_count}, ensure_ascii=False).encode('utf-8') self.__conn.request('POST', self.__url.path, postdata, {'Host': self.__url.hostname, 'User-Agent': USER_AGENT, @@ -121,7 +121,7 @@ def __call__(self, *args): return response['result'] def _batch(self, rpc_call_list): - postdata = json.dumps(list(rpc_call_list)) + postdata = json.dumps(list(rpc_call_list), ensure_ascii=False).encode('utf-8') self.__conn.request('POST', self.__url.path, postdata, {'Host': self.__url.hostname, 'User-Agent': USER_AGENT,