From 3968d13df9204c93a28cb7bef98c367d5a95cc60 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Thu, 22 May 2014 10:26:50 +0200 Subject: [PATCH] Fix scripts/reconvert_l10n.py's encodings on Windows --- scripts/reconvert_l10n.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/reconvert_l10n.py b/scripts/reconvert_l10n.py index 897f2c1d3..dae9f512e 100644 --- a/scripts/reconvert_l10n.py +++ b/scripts/reconvert_l10n.py @@ -8,7 +8,7 @@ JSON_KEY_TR="tr" JSON_KEY_CO="context" if __name__ == '__main__': - po = polib.pofile(open(sys.argv[1]).read()) + po = polib.pofile(open(sys.argv[1], encoding='utf-8').read()) translations = [] for entry in po: @@ -24,7 +24,7 @@ if __name__ == '__main__': json.dump( result, - open(sys.argv[1] + '.json', 'w'), + open(sys.argv[1] + '.json', 'w', encoding='utf-8'), ensure_ascii=False, indent="\t", separators=(',', ': '),