Fix T74959: Need to be explicit about UTF8 encoding in py.

Because some OSs are still using old 8bits specific encodings... Angry
eye @windows...
This commit is contained in:
2020-03-20 20:49:48 +01:00
parent 3d9d132ccd
commit 9607e54985
4 changed files with 8 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ def gen_menu_file(stats, settings):
else:
# Non-existing, commented entry!
data_lines.append("# {} #{}:{}:{}".format(FLAG_MESSAGES[flag], uid_num, label, uid))
with open(os.path.join(settings.TRUNK_MO_DIR, settings.LANGUAGES_FILE), 'w') as f:
with open(os.path.join(settings.TRUNK_MO_DIR, settings.LANGUAGES_FILE), 'w', encoding="utf8") as f:
f.write("\n".join(data_lines))
with open(os.path.join(settings.GIT_I18N_ROOT, settings.LANGUAGES_FILE), 'w') as f:
with open(os.path.join(settings.GIT_I18N_ROOT, settings.LANGUAGES_FILE), 'w', encoding="utf8") as f:
f.write("\n".join(data_lines))