From: Juergen Spitzmueller Date: Mon, 25 Dec 2017 11:22:45 +0000 (+0100) Subject: Improve error msg X-Git-Tag: lyx-2.4.0dev-acb2ca7b~4136 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=69f41b54b8616058ef5a9ad63d7a10225b3e4176;p=features.git Improve error msg --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 294c7a1092..9442f23756 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1706,13 +1706,23 @@ bool Buffer::makeLaTeXFile(FileName const & fname, docstring const failed(1, e.failed_char); ostringstream oss; oss << "0x" << hex << e.failed_char << dec; - docstring msg = bformat(_("Could not find LaTeX command for character '%1$s'" - " (code point %2$s)"), - failed, from_utf8(oss.str())); - errorList.push_back(ErrorItem(msg, _("Some characters of your document are probably not " - "representable in the chosen encoding.\n" - "Changing the document encoding to utf8 could help."), - {e.par_id, e.pos}, {e.par_id, e.pos + 1})); + if (getParFromID(e.par_id).paragraph().layout().pass_thru) { + docstring msg = bformat(_("Uncodable character '%1$s'" + " (code point %2$s)"), + failed, from_utf8(oss.str())); + errorList.push_back(ErrorItem(msg, _("Some characters of your document are not " + "representable in specific verbatim contexts.\n" + "Changing the document encoding to utf8 could help."), + {e.par_id, e.pos}, {e.par_id, e.pos + 1})); + } else { + docstring msg = bformat(_("Could not find LaTeX command for character '%1$s'" + " (code point %2$s)"), + failed, from_utf8(oss.str())); + errorList.push_back(ErrorItem(msg, _("Some characters of your document are probably not " + "representable in the chosen encoding.\n" + "Changing the document encoding to utf8 could help."), + {e.par_id, e.pos}, {e.par_id, e.pos + 1})); + } failed_export = true; } catch (iconv_codecvt_facet_exception const & e) {