]> git.lyx.org Git - lyx.git/blobdiff - src/output_plaintext.C
revert recent change to development/FORMAT (don't change history)
[lyx.git] / src / output_plaintext.C
index 96d576556528adc05280d528a962d1cc750fd1bd..2327206b9f072a294e96c07cd245104aeec9bda2 100644 (file)
@@ -23,6 +23,7 @@
 #include "ParagraphParameters.h"
 
 #include "support/lstrings.h"
+#include "support/unicode.h"
 
 #include <fstream>
 
@@ -232,8 +233,9 @@ void asciiParagraph(Buffer const & buf,
                                "writeAsciiFile: NULL char in structure." << endl;
                        break;
 
-               default:
-                       word += c;
+               default: {
+                       std::vector<char> const tmp = ucs4_to_utf8(c);
+                       word.append(tmp.begin(), tmp.end());
                        if (runparams.linelen > 0 &&
                            currlinelen + word.length() > runparams.linelen)
                        {
@@ -244,6 +246,7 @@ void asciiParagraph(Buffer const & buf,
                        }
                        break;
                }
+               }
        }
        os << word;
 }