]> git.lyx.org Git - features.git/commitdiff
Amend 6def81f30ff4f73. Never switch encodings with XeTeX or LuaTeX.
authorGünter Milde <milde@lyx.org>
Fri, 5 Apr 2019 14:14:58 +0000 (16:14 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:24 +0000 (15:48 +0200)
src/output_latex.cpp

index 784a9e58bb1adf24cac8d52118dc633ea4a332aa..3816e657181ac5c551a0f11fdee49ec8263b74bd 100644 (file)
@@ -1337,15 +1337,13 @@ void TeXOnePar(Buffer const & buf,
        }
 
        // Information about local language is stored as a font feature.
-       // If this is the last paragraph, and a local_font was set upon entering
-       // the inset and we're using "auto" or "default" encoding (and not
-       // compiling with LuaTeX), ensure the encoding is set back to the default
-       // encoding of the local language.
+       // If this is the last paragraph of the inset and a local_font was set upon entering
+       // and we are mixing encodings ("auto" or "default" and no XeTeX or LuaTeX),
+       // ensure the encoding is set back to the default encoding of the local language.
        if (runparams.isLastPar && runparams_in.local_font != 0
            && runparams_in.encoding != runparams_in.local_font->language()->encoding()
            && (bparams.inputenc == "auto" || bparams.inputenc == "default")
-               && runparams.flavor != OutputParams::LUATEX
-               && runparams.flavor != OutputParams::DVILUATEX
+               && !runparams.isFullUnicode()
           ) {
                runparams_in.encoding = runparams_in.local_font->language()->encoding();
                os << setEncoding(runparams_in.encoding->iconvName());