Set encoding for all text reads and writes to utf8, as windows defaults to latin1

This commit is contained in:
Veronica K. B. Olsen
2019-10-28 13:44:13 +01:00
parent 3a8b7846ab
commit f760eeb544
14 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ class TextFile():
that uses a different file format that requires a different approach.
"""
try:
self.outFile = open(filePath,mode="wt+")
self.outFile = open(filePath,mode="wt+",encoding="utf8")
self.outFile.write("\n\n")
except Exception as e:
self.makeAlert(["Failed to open file.",str(e)], nwAlert.ERROR)