mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-30 22:51:07 +02:00
Use utf-8 encoding while formatting translations on Windows. (#376)
When running sync_translations.py on Windows, an error will show because it use gbk encoding by default. Using utf-8 encoding explicitly can fix it.
This commit is contained in:
@ -34,5 +34,5 @@ baseline = parse_strings_file("res/values/strings.xml")
|
|||||||
for strings_file in glob.glob("res/values-*/strings.xml"):
|
for strings_file in glob.glob("res/values-*/strings.xml"):
|
||||||
print(strings_file)
|
print(strings_file)
|
||||||
strings = dict(parse_strings_file(strings_file))
|
strings = dict(parse_strings_file(strings_file))
|
||||||
with open(strings_file, "w") as out:
|
with open(strings_file, "w", encoding="utf-8") as out:
|
||||||
write_updated_strings(out, baseline, strings)
|
write_updated_strings(out, baseline, strings)
|
||||||
|
Reference in New Issue
Block a user