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,