// We don't know the encoding of inputpath
docstring const inputpath = from_utf8(latex_path(original_path));
docstring uncodable_glyphs;
- for (size_t n = 0; n < inputpath.size(); ++n) {
- docstring const glyph = docstring(1, inputpath[n]);
- try {
- if (runparams.encoding
- && runparams.encoding->latexChar(inputpath[n]) != glyph) {
+ Encoding const * const enc = runparams.encoding;
+ if (enc) {
+ for (size_t n = 0; n < inputpath.size(); ++n) {
+ docstring const glyph =
+ docstring(1, inputpath[n]);
+ if (enc->latexChar(inputpath[n], true) != glyph) {
LYXERR0("Uncodable character '"
<< glyph
<< "' in input path!");
uncodable_glyphs += glyph;
}
- } catch (EncodingException & /* e */) {
- LYXERR0("Uncodable character '"
- << glyph
- << "' in input path!");
- uncodable_glyphs += glyph;
}
}
"or change the path name."), inputpath, uncodable_glyphs));
} else {
os << "\\makeatletter\n"
- << "\\def\\input@path{{"
- << inputpath << "/}}\n"
- << "\\makeatother\n";
+ << "\\def\\input@path{{"
+ << inputpath << "/}}\n"
+ << "\\makeatother\n";
d->texrow.newline();
d->texrow.newline();
d->texrow.newline();
}
-docstring Encoding::latexChar(char_type c, bool for_mathed) const
+docstring Encoding::latexChar(char_type c, bool no_commands) const
{
// assure the used encoding is properly initialized
init();
return docstring(1, c);
if (encodable_.find(c) != encodable_.end())
return docstring(1, c);
- if (for_mathed)
+ if (no_commands)
return docstring();
// c cannot (or should not) be encoded in this encoding
* LaTeX macro is known, a warning is given of lyxerr, and the
* character is returned.
*/
- docstring latexChar(char_type c, bool for_mathed = false) const;
+ docstring latexChar(char_type c, bool no_commands = false) const;
/// Which LaTeX package handles this encoding?
Package package() const { return package_; }
/// A list of all characters usable in this encoding