From a5377ead20682df741e9225fd54acf2799912973 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 28 Mar 2017 12:05:52 +0200 Subject: [PATCH] Account for unicode chars in tempdir path on Windows --- src/Buffer.cpp | 2 +- src/output.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index a20b4da3db..a966f6dbb8 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1313,7 +1313,7 @@ Buffer::ReadStatus Buffer::convertLyXFormat(FileName const & fn, command << os::python() << ' ' << quoteName(lyx2lyx.toFilesystemEncoding()) << " -t " << convert(LYX_FORMAT) - << " -o " << quoteName(tmpfile.toFilesystemEncoding()) + << " -o " << quoteName(tmpfile.toSafeFilesystemEncoding()) << ' ' << quoteName(fn.toSafeFilesystemEncoding()); string const command_str = command.str(); diff --git a/src/output.cpp b/src/output.cpp index 149ba78cea..f1369e5790 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -30,7 +30,7 @@ namespace { template bool doOpenFileWrite(OFStream & ofs, FileName const & fname) { - ofs.open(fname.toFilesystemEncoding().c_str()); + ofs.open(fname.toSafeFilesystemEncoding(os::CREATE).c_str()); if (ofs) return true; docstring const file = fname.displayName(50);