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 from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx') fd, tmpfname = mkstemp(suffix='.ltx')
if os.name == 'nt': if os.name == 'nt':
from locale import getdefaultlocale encoding = sys.getfilesystemencoding()
language, encoding = getdefaultlocale()
if encoding == None:
encoding = 'latin1'
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
inpname = shortPath(unicode(tmpfname, encoding)).replace('\\', '/') inpname = shortPath(unicode(tmpfname, encoding)).replace('\\', '/')
else: else: