From 94d45d9c56f13e9b8a6d9e1165d9ab90078e24c7 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 23 Jul 2017 12:06:58 +0200 Subject: [PATCH] Some comments wrt log file encoding (#10728) --- src/LaTeX.cpp | 3 +++ src/frontends/qt4/GuiLog.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index b58bad6918..24b44e9e3a 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -651,6 +651,9 @@ int LaTeX::scanLogFile(TeXErrors & terr) onlyFileName(changeExtension(file.absFileName(), ".log")); LYXERR(Debug::LATEX, "Log file: " << tmp); FileName const fn = FileName(makeAbsPath(tmp)); + // FIXME we should use and ifdocstream here and a docstring for token + // below. The encoding of the log file depends on the _output_ (font) + // encoding of the TeX file (T1, TU etc.). See #10728. ifstream ifs(fn.toFilesystemEncoding().c_str()); bool fle_style = false; static regex const file_line_error(".+\\.\\D+:[0-9]+: (.+)"); diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp index 6d49e725e8..1f4bb45937 100644 --- a/src/frontends/qt4/GuiLog.cpp +++ b/src/frontends/qt4/GuiLog.cpp @@ -307,6 +307,8 @@ void GuiLog::getContents(ostream & ss) const // FIXME UNICODE // Our caller interprets the file contents as UTF8, but is that // correct? + // spitz: No it isn't (generally). The log file encoding depends on the TeX + // _output_ encoding (T1 etc.). We should account for that. See #10728. if (in) { ss << in.rdbuf(); success = ss.good(); -- 2.39.2