From 498f71a21be5e0bb4f454d909220d141a07a689c Mon Sep 17 00:00:00 2001 From: noisyfox Date: Sat, 7 Jan 2017 19:22:36 +1100 Subject: [PATCH] Save json config as utf8 --- mujson_mgr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mujson_mgr.py b/mujson_mgr.py index 5dbd44b..62d8316 100644 --- a/mujson_mgr.py +++ b/mujson_mgr.py @@ -27,8 +27,8 @@ class MuJsonLoader(object): def save(self, path): if self.json: output = json.dumps(self.json, sort_keys=True, indent=4, separators=(',', ': ')) - with open(path, 'w') as f: - f.write(output) + with open(path, 'wb') as f: + f.write(output.encode('utf8')) class MuMgr(object):