mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
2669c51d1a
commit
9b3398d56c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user