X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FChktex.C;h=09c48a7eabe1a45963a5e7d861c3439839d6df72;hb=2734cc154853c61a7ea54bfeea3adc908f68bdc5;hp=fc492f48cdf688f8b6ef8dfe88d2047c72bb10a9;hpb=6c300f72a217722652dc27db9108e1050028979c;p=lyx.git diff --git a/src/Chktex.C b/src/Chktex.C index fc492f48cd..09c48a7eab 100644 --- a/src/Chktex.C +++ b/src/Chktex.C @@ -16,14 +16,13 @@ #include "LaTeX.h" // TeXErrors #include "support/convert.h" +#include "support/docstream.h" #include "support/filetools.h" #include "support/lstrings.h" #include "support/systemcall.h" #include -#include - namespace lyx { @@ -61,23 +60,25 @@ int Chktex::run(TeXErrors &terr) int Chktex::scanLogFile(TeXErrors & terr) { - string token; int retval = 0; string const tmp = onlyFilename(changeExtension(file, ".log")); #if USE_BOOST_FORMAT - boost::format msg(to_utf8(_("ChkTeX warning id # %1$d"))); + boost::basic_format msg(_("ChkTeX warning id # %1$d")); #else - string const msg(to_utf8(_("ChkTeX warning id # "))); + docstring const msg(_("ChkTeX warning id # ")); #endif - ifstream ifs(tmp.c_str()); + docstring token; + // FIXME UNICODE + // We have no idea what the encoding of the error file is + idocfstream ifs(tmp.c_str()); while (getline(ifs, token)) { - string srcfile; - string line; - string pos; - string warno; - string warning; + docstring srcfile; + docstring line; + docstring pos; + docstring warno; + docstring warning; token = split(token, srcfile, ':'); token = split(token, line, ':'); token = split(token, pos, ':');