from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx')
if os.name == 'nt':
+ from locale import getdefaultlocale
from ctypes import windll, create_unicode_buffer
GetShortPathName = windll.kernel32.GetShortPathNameW
- longname = unicode(tmpfname)
+ language, encoding = getdefaultlocale()
+ if encoding == None:
+ encoding = 'latin1'
+ longname = unicode(tmpfname, encoding)
shortlen = GetShortPathName(longname, 0, 0)
shortname = create_unicode_buffer(shortlen)
if GetShortPathName(longname, shortname, shortlen):
- Fix pasting of LATIN CAPITAL LETTER SHARP S (bug 8057).
+- Fix reconfiguration on Windows when the temporary directory used by
+ python contains non-ascii characters.
+
* TEX2LYX