]> git.lyx.org Git - features.git/commitdiff
Fix bug #6250: LyX 1.6.4 crashes when copying Japanese text in math to clipboard
authorEnrico Forestieri <forenr@lyx.org>
Fri, 9 Oct 2009 21:33:08 +0000 (21:33 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Fri, 9 Oct 2009 21:33:08 +0000 (21:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31572 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathHull.cpp

index 8b85e064fc75b1d9de6cf99e4dd85cdc184f04b8..e3d09f7ea114becdfa7076d1e3d9d351d95020ba 100644 (file)
@@ -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);