Start to export palin text in utf8 (no insets besides InsetText for now)

* src/output_plaintext.C
	(asciiParagraph): output utf8 instead of ucs4 garbage


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14700 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-08-16 11:56:06 +00:00
parent 2669c51d1a
commit 9b3398d56c

View 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;
}