mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 06:20:28 +00:00
simplify ucs4 to utf8 conversion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22577 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
098c808174
commit
12ce8e82cf
@ -53,7 +53,6 @@
|
|||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
#include "support/Messages.h"
|
#include "support/Messages.h"
|
||||||
#include "support/textutils.h"
|
#include "support/textutils.h"
|
||||||
#include "support/unicode.h"
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -1158,11 +1157,9 @@ void Paragraph::write(Buffer const & buf, ostream & os,
|
|||||||
}
|
}
|
||||||
// this check is to amend a bug. LyX sometimes
|
// this check is to amend a bug. LyX sometimes
|
||||||
// inserts '\0' this could cause problems.
|
// inserts '\0' this could cause problems.
|
||||||
if (c != '\0') {
|
if (c != '\0')
|
||||||
vector<char> tmp = ucs4_to_utf8(c);
|
os << to_utf8(docstring(1, c));
|
||||||
tmp.push_back('\0');
|
else
|
||||||
os << &tmp[0];
|
|
||||||
} else
|
|
||||||
lyxerr << "ERROR (Paragraph::writeFile):"
|
lyxerr << "ERROR (Paragraph::writeFile):"
|
||||||
" NULL char in structure." << endl;
|
" NULL char in structure." << endl;
|
||||||
++column;
|
++column;
|
||||||
|
Loading…
Reference in New Issue
Block a user