From: Enrico Forestieri Date: Fri, 9 Oct 2009 21:33:08 +0000 (+0000) Subject: Fix bug #6250: LyX 1.6.4 crashes when copying Japanese text in math to clipboard X-Git-Tag: 2.0.0~5388 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a7c944b2800aeaac3c8f7d8bf24a52f4532b3193;p=features.git 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/trunk@31572 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 8b85e064fc..e3d09f7ea1 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" @@ -1656,7 +1657,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; @@ -1670,7 +1671,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); // Fix Bug #6139 if (type_ == hullRegexp) write(wi);