build: always use utf-8 when reading/writing text files

open() in text mode should never be used without an encoding because it defaults
to the locale encoding which is rarely what is wanted.

This fixes the Windows build in some cases (depending on the locale/paths used)
This commit is contained in:
Christoph Reiter
2019-06-21 15:01:17 +02:00
parent 7b42bade95
commit 5107735c9f
5 changed files with 8 additions and 8 deletions

View File

@ -82,7 +82,7 @@ xml += '''
if len(sys.argv) > 2:
outfile = sys.argv[2]
f = open(outfile, 'w')
f = open(outfile, 'w', encoding='utf-8')
f.write(xml)
f.close()
else: