]> git.lyx.org Git - features.git/commitdiff
Some comments wrt log file encoding (#10728)
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 23 Jul 2017 10:06:58 +0000 (12:06 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 23 Jul 2017 10:06:58 +0000 (12:06 +0200)
src/LaTeX.cpp
src/frontends/qt4/GuiLog.cpp

index b58bad691872fdd1f76ec9e5b7079b6532705496..24b44e9e3aa13bf54f2197d596975a80f7d9247e 100644 (file)
@@ -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]+: (.+)");
index 6d49e725e89a51f6ce930d99501adff6ceaa0a9f..1f4bb459378dd82d5268fa8f39719489d06e9967 100644 (file)
@@ -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();