Explicitly specify encoding when opening text files in Python code

This commit is contained in:
practicalswift committed 2018-06-12 21:34:52 +02:00
1 parent fa4b9065a8
commit 634bd97001
19 files changed
+38 -38

No files matched your search

+1 -1
View File
@@ -63,7 +63,7 @@ child = Popen([XGETTEXT,'--output=-','-n','--keyword=_'] + files, stdout=PIPE)
messages = parse_po(out.decode('utf-8'))
f = open(OUT_CPP, 'w')
f = open(OUT_CPP, 'w', encoding="utf8")
f.write("""
#include <QtGlobal>