Issue with printing unicode non-english characters #8425 patch

This commit is contained in:
Alexander Lozovskoy 2014-08-06 12:38:14 +04:00
parent e90d2573d1
commit 5165dfa2df

View file

@ -205,9 +205,9 @@ def jsonify(result, format=False):
if type(value) is str: if type(value) is str:
result2[key] = value.decode('utf-8', 'ignore') result2[key] = value.decode('utf-8', 'ignore')
if format: if format:
return json.dumps(result2, sort_keys=True, indent=4) return json.dumps(result2, sort_keys=True, indent=4, ensure_ascii=False)
else: else:
return json.dumps(result2, sort_keys=True) return json.dumps(result2, sort_keys=True, ensure_ascii=False)
def write_tree_file(tree, hostname, buf): def write_tree_file(tree, hostname, buf):
''' write something into treedir/hostname ''' ''' write something into treedir/hostname '''