X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraph.cpp;h=4f4d9ff5630454a6e255d9183443a39fdf8786b7;hb=1acedf11da79f509da706bc8d6d2f491c9676087;hp=aeece98bddc6e20b6b0b50b6757fdd69640a45a8;hpb=e69b723bf9d2e2d8bbd855cac164be4a1a24035e;p=lyx.git diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index aeece98bdd..4f4d9ff563 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -53,7 +53,6 @@ #include "support/lstrings.h" #include "support/Messages.h" #include "support/textutils.h" -#include "support/unicode.h" #include #include @@ -1158,11 +1157,9 @@ void Paragraph::write(Buffer const & buf, ostream & os, } // this check is to amend a bug. LyX sometimes // inserts '\0' this could cause problems. - if (c != '\0') { - vector tmp = ucs4_to_utf8(c); - tmp.push_back('\0'); - os << &tmp[0]; - } else + if (c != '\0') + os << to_utf8(docstring(1, c)); + else lyxerr << "ERROR (Paragraph::writeFile):" " NULL char in structure." << endl; ++column;