From 79879822e60fe244623cbc9e574339bc1b711dfb Mon Sep 17 00:00:00 2001 From: David Kilias Date: Thu, 26 Mar 2020 00:05:02 +0100 Subject: [PATCH] save utf8 encoded json --- edit_data_form.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit_data_form.py b/edit_data_form.py index 219d85f..276ccc1 100755 --- a/edit_data_form.py +++ b/edit_data_form.py @@ -69,8 +69,8 @@ def main(*_args): out_data = app.get_data_from_form() outfile_path = app.get_filepath() print(f"Writing changed Member Data to {outfile_path}") - with open(outfile_path, 'w') as outfile: - json.dump(out_data, outfile, sort_keys=True, indent=4) + with open(outfile_path, 'w', encoding='utf8') as outfile: + json.dump(out_data, outfile, sort_keys=True, indent=4, ensure_ascii=False) else: print("Nothing has changed, skipping writing file")