Proper patch for #1923 (Fixes #1940, #1941)

This commit is contained in:
Miroslav Stampar
2016-06-10 17:42:11 +02:00
parent 91372bff87
commit 98fdc493f4
2 changed files with 3 additions and 3 deletions

View File

@@ -940,8 +940,8 @@ def dataToOutFile(filename, data):
retVal = os.path.join(conf.filePath, filePathToSafeString(filename))
try:
with openFile(retVal, "w+b") as f:
f.write(data)
with open(retVal, "w+b") as f: # has to stay as non-codecs because data is raw ASCII encoded data
f.write(unicodeencode(data))
except IOError, ex:
errMsg = "something went wrong while trying to write "
errMsg += "to the output file ('%s')" % getSafeExString(ex)