]> git.lyx.org Git - features.git/commitdiff
Partial fix for bug #11586
authorEnrico Forestieri <forenr@lyx.org>
Sun, 26 May 2019 07:27:46 +0000 (09:27 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:30 +0000 (15:48 +0200)
Do not replace a latex command with the corresponding symbol
in the unicodesymbols file unless it can be encoded in the
document encoding.

src/mathed/MathParser.cpp

index 0fe6e0f416776409622d53086f583f65b9f2f8cf..3449cff5ac426fe85eb8f5750a716e68a6314878 100644 (file)
@@ -2081,7 +2081,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                                                        Encodings::MATH_CMD | Encodings::TEXT_CMD,
                                                        is_combining, termination);
                                        }
-                                       if (c) {
+                                       if (c && buf->params().encoding().encodable(c)) {
                                                if (termination) {
                                                        if (nextToken().cat() == catBegin) {
                                                                getToken();