From 7edf2691ae1e6a88f84dcccbdffeea1111e0a290 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 27 Feb 2011 12:16:17 +0000 Subject: [PATCH] Fix bug #7310 (Greek symbols inside ERT cause unreported compile failure) Note that View->Source now shows that a character cannot be encoded. However, the error is still unreported due to bug #7324. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37791 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0df5e36432..9f3fb5ec98 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1156,10 +1156,12 @@ void Paragraph::Private::latexSpecialChar(otexstream & os, char_type const c = text_[i]; if (style.pass_thru || runparams.pass_thru) { - if (c != '\0') - // FIXME UNICODE: This can fail if c cannot - // be encoded in the current encoding. + if (c != '\0') { + Encoding const * const enc = runparams.encoding; + if (enc && enc->latexChar(c, true).empty()) + throw EncodingException(c); os.put(c); + } return; } -- 2.39.2