Set encoding for all text reads and writes to utf8, as windows defaults to latin1
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user