#include "support/filetools.h"
#include "support/lyxalgo.h"
#include "support/lstrings.h"
+#include "support/types.h"
+#include "support/unicode.h"
#include <functional>
-using lyx::support::compare_ascii_no_case;
-using lyx::support::getFormatFromContents;
-using lyx::support::makeDisplayPath;
-using lyx::support::split;
-using lyx::support::subst;
+
+namespace lyx {
+
+using support::compare_ascii_no_case;
+using support::getFormatFromContents;
+using support::makeDisplayPath;
+using support::split;
+using support::subst;
using std::endl;
using std::getline;
}
+docstring const LyXLex::Pimpl::getDocString() const
+{
+ std::vector<char_type> res = utf8_to_ucs4(buff);
+ docstring dstr(res.begin(), res.end());
+ return dstr;
+}
+
+
void LyXLex::Pimpl::printError(string const & message) const
{
string const tmpmsg = subst(message, "$$Token", getString());
lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
- << " of file " << makeDisplayPath(name) << ']' << endl;
+ << " of file " << to_utf8(makeDisplayPath(name)) << ']' << endl;
}
{
pushTok = pt;
}
+
+
+} // namespace lyx