Fix bug #6365: tex2lyx uses wrong encoding in the preamble.

Everything is ok while reading the file, but when the lyxfile is written, only the first byte of a double-byte character is written to the file. This is because t.character() is sort of defined as cs_[0] in which cs_ is a docstring. This thus seems to fail for multi-byte characters.

Compare with src\tex2lyx\text.cpp line: 1250.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32441 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-12-09 12:29:48 +00:00
parent ccfcd71b36
commit e3b26029cc

View File

@ -547,7 +547,7 @@ void parse_preamble(Parser & p, ostream & os,
t.cat() == catEnd ||
t.cat() == catAlign ||
t.cat() == catParameter))
h_preamble << t.character();
h_preamble << t.cs();
else if (!in_lyx_preamble &&
(t.cat() == catSpace || t.cat() == catNewline))