]> git.lyx.org Git - features.git/commitdiff
* InsetInclude.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Sun, 28 Nov 2010 14:20:45 +0000 (14:20 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sun, 28 Nov 2010 14:20:45 +0000 (14:20 +0000)
- if a master is compiled with XeteX or LuaTeX, all children must have plain utf8 encoding
  (bug #6774).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36554 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetInclude.cpp

index 8129aff8c7b9890915afd5d3f04a5cc3682f5c76..f0e2f99807bc96379624b9a8d54a5fcd60441e72 100644 (file)
@@ -20,6 +20,7 @@
 #include "BufferView.h"
 #include "Cursor.h"
 #include "DispatchResult.h"
+#include "Encoding.h"
 #include "ErrorList.h"
 #include "Exporter.h"
 #include "Format.h"
@@ -579,7 +580,11 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
                // and language.
                Encoding const * const oldEnc = runparams.encoding;
                Language const * const oldLang = runparams.master_language;
-               runparams.encoding = &tmp->params().encoding();
+               // If the master has full unicode flavor (XeTeX, LuaTeX),
+               // the children must be encoded in plain utf8!
+               runparams.encoding = runparams.isFullUnicode() ?
+                       encodings.fromLyXName("utf8-plain")
+                       : &tmp->params().encoding();
                runparams.master_language = buffer().params().language;
                tmp->makeLaTeXFile(writefile,
                                   masterFileName(buffer()).onlyPath().absFileName(),