From e3b26029ccdf802f99e54e9939c03c49f3714235 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 9 Dec 2009 12:29:48 +0000 Subject: [PATCH] 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 --- src/tex2lyx/preamble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tex2lyx/preamble.cpp b/src/tex2lyx/preamble.cpp index b91040b20c..328c7bc5bc 100644 --- a/src/tex2lyx/preamble.cpp +++ b/src/tex2lyx/preamble.cpp @@ -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))