save utf8 encoded json #20

Merged
tux merged 1 commit from utf8 into master 2020-03-26 10:40:04 +01:00
Showing only changes of commit 79879822e6 - Show all commits

View file

@ -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:
Review

Hattest Du mal probiert, ob es ohne den encoding-Parameter geht? mW ist utf-8 bei Python Standard.
Er schadet aber auch nicht.

Hattest Du mal probiert, ob es ohne den encoding-Parameter geht? mW ist utf-8 bei Python Standard. Er schadet aber auch nicht.
json.dump(out_data, outfile, sort_keys=True, indent=4, ensure_ascii=False)
else:
print("Nothing has changed, skipping writing file")