[LyX/master] Consider encoding when re-setting language

Juergen Spitzmueller spitz at lyx.org
Sat Aug 15 16:55:51 UTC 2020


commit 6876a306b94bfb41b4947e77498fbe58952f88ce
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Aug 15 19:20:30 2020 +0200

    Consider encoding when re-setting language
---
 src/Paragraph.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 7b46d1e..8dbe0be 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1071,6 +1071,8 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
 		running_font = basefont;
 		if (!closeLanguage)
 			running_font.setLanguage(copy_font.language());
+		OutputParams rp = runparams;
+		rp.encoding = basefont.language()->encoding();
 		// For these, we use switches, so they should be taken as
 		// base inside the inset.
 		basefont.fontInfo().setSize(copy_font.fontInfo().size());
@@ -1084,7 +1086,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
 			  && !textinset->text().isMainText()
 			: false;
 		unsigned int count2 = basefont.latexWriteStartChanges(os, bparams,
-						      runparams, running_font,
+						      rp, running_font,
 						      basefont, true,
 						      cprotect);
 		column += count2;


More information about the lyx-cvs mailing list