Get the file system encoding from sys instead of the locale

This commit is contained in:
José Matos 2017-03-29 14:24:34 +01:00
parent 67bf174b10
commit dc7ac99d18

View File

@ -196,10 +196,7 @@ def checkTeXPaths():
from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx')
if os.name == 'nt':
from locale import getdefaultlocale
language, encoding = getdefaultlocale()
if encoding == None:
encoding = 'latin1'
encoding = sys.getfilesystemencoding()
if sys.version_info[0] < 3:
inpname = shortPath(unicode(tmpfname, encoding)).replace('\\', '/')
else: