diff --git a/JSONDecoder.py b/JSONDecoder.py index 4948338..8843b68 100644 --- a/JSONDecoder.py +++ b/JSONDecoder.py @@ -127,7 +127,7 @@ def setMessage(self, content, isRequest): clean = msg[boundary:] try: - pretty_msg = garbage.strip() + '\n' + json.dumps(json.loads(clean), indent=4) + pretty_msg = garbage.strip() + '\n' + json.dumps(json.loads(clean), indent=4, ensure_ascii=False).encode('utf8') except: print "problem parsing data in setMessage" pretty_msg = garbage + clean