Set encoding for all text reads and writes to utf8, as windows defaults to latin1
This commit is contained in:
+2
-2
@@ -13,13 +13,13 @@ def ensureDir(theDir):
|
||||
def cmpFiles(fileOne, fileTwo, ignoreLines=[]):
|
||||
|
||||
try:
|
||||
foOne = open(fileOne,mode="r")
|
||||
foOne = open(fileOne,mode="r",encoding="utf8")
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
return False
|
||||
|
||||
try:
|
||||
foTwo = open(fileTwo,mode="r")
|
||||
foTwo = open(fileTwo,mode="r",encoding="utf8")
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user