Some comments wrt log file encoding (#10728)

This commit is contained in:
Juergen Spitzmueller 2017-07-23 12:06:58 +02:00
parent 7609221ada
commit 94d45d9c56
2 changed files with 5 additions and 0 deletions

View File

@ -651,6 +651,9 @@ int LaTeX::scanLogFile(TeXErrors & terr)
onlyFileName(changeExtension(file.absFileName(), ".log")); onlyFileName(changeExtension(file.absFileName(), ".log"));
LYXERR(Debug::LATEX, "Log file: " << tmp); LYXERR(Debug::LATEX, "Log file: " << tmp);
FileName const fn = FileName(makeAbsPath(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()); ifstream ifs(fn.toFilesystemEncoding().c_str());
bool fle_style = false; bool fle_style = false;
static regex const file_line_error(".+\\.\\D+:[0-9]+: (.+)"); static regex const file_line_error(".+\\.\\D+:[0-9]+: (.+)");

View File

@ -307,6 +307,8 @@ void GuiLog::getContents(ostream & ss) const
// FIXME UNICODE // FIXME UNICODE
// Our caller interprets the file contents as UTF8, but is that // Our caller interprets the file contents as UTF8, but is that
// correct? // 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) { if (in) {
ss << in.rdbuf(); ss << in.rdbuf();
success = ss.good(); success = ss.good();