From 8f2106783fbf45961669e5536727e9fbab40ae4c Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 11 Oct 2009 15:26:57 +0000 Subject: [PATCH] Fix bug #6250: LyX 1.6.4 crashes when copying Japanese text in math to clipboard git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31591 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathHull.cpp | 6 ++++-- status.16x | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 14c87784df..f5d8202afe 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -30,6 +30,7 @@ #include "BufferParams.h" #include "BufferView.h" #include "CutAndPaste.h" +#include "Encoding.h" #include "FuncStatus.h" #include "LaTeXFeatures.h" #include "Cursor.h" @@ -1627,7 +1628,7 @@ bool InsetMathHull::readQuiet(Lexer & lex) } -int InsetMathHull::plaintext(odocstream & os, OutputParams const & runparams) const +int InsetMathHull::plaintext(odocstream & os, OutputParams const &) const { if (0 && display()) { Dimension dim; @@ -1641,7 +1642,8 @@ int InsetMathHull::plaintext(odocstream & os, OutputParams const & runparams) co return tpain.textheight(); } else { odocstringstream oss; - WriteStream wi(oss, false, true, WriteStream::wsDefault, runparams.encoding); + Encoding const * const enc = encodings.fromLyXName("utf8"); + WriteStream wi(oss, false, true, WriteStream::wsDefault, enc); wi << cell(0); docstring const str = oss.str(); diff --git a/status.16x b/status.16x index beefc1f441..d41747781b 100644 --- a/status.16x +++ b/status.16x @@ -140,6 +140,10 @@ What's new - Fix a crash when trying to launch the settings dialog of an unknown external inset (bug 6259). +- Fix crash when copying a math inset containing a non-ascii character + which is missing a LaTeX command representation in the unicodesymbols + file (bug 6250). + - Fix a number of assertions when displaying error messages (bug 6205). - Fix bad allocation exception when displaying long tooltips (bug 6215).