branch: 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.

see r32441.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-12-09 13:50:14 +00:00
parent 223f2c0acc
commit 443846282c
2 changed files with 4 additions and 1 deletions

View File

@ -544,7 +544,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))

View File

@ -63,6 +63,9 @@ What's new
- Export the image when generating a preview, after an image
reload (bug 6356).
- Fix the import of tex files with multi-byte characters in
the preamble (bug 6365).
* USER INTERFACE