]> git.lyx.org Git - features.git/commitdiff
Fix bug #6365: tex2lyx uses wrong encoding in the preamble.
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 9 Dec 2009 12:29:48 +0000 (12:29 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 9 Dec 2009 12:29:48 +0000 (12:29 +0000)
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

src/tex2lyx/preamble.cpp

index b91040b20c20bb5ae45853ae3a0a8e8af89b8c68..328c7bc5bc3dedf1f9072f6cdecaf6190ea207bc 100644 (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))