X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Ftext.cpp;h=62d5e8df9ebfaf80c6d3458a94bf37d5ffdba6af;hb=fe5a4c8c81ef2e5dca844732c7f24545b5edaca9;hp=0d1a3d00e5b50763cc105932452784e912820b58;hpb=d8611f25f2fe869518f32c74492da07d33f34e12;p=lyx.git diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 0d1a3d00e5..62d5e8df9e 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -119,6 +119,9 @@ char const * const known_coded_ref_commands[] = { "ref", "pageref", "vref", /** * supported CJK encodings + * SJIS anf Bg5 cannot be supported as this is not + * supported by iconv + * JIS does not work with LyX's encoding conversion */ const char * const supported_CJK_encodings[] = { "EUC-JP", "KS", "GB", "UTF8", 0}; @@ -1428,9 +1431,9 @@ void parse_environment(Parser & p, ostream & os, bool outer, // store the encoding to be able to reset it string const encoding_old = p.getEncoding(); string const encoding = p.getArg('{', '}'); - // SJIS and BIG5 don't work with LaTeX according to the comment in unicode.cpp + // SJIS and Bg5 cammopt be handled by iconv // JIS does not work with LyX's encoding conversion - if (encoding != "SJIS" && encoding != "BIG5" && encoding != "JIS") + if (encoding != "Bg5" && encoding != "JIS" && encoding != "SJIS") p.setEncoding(encoding); else p.setEncoding("utf8"); @@ -1442,7 +1445,7 @@ void parse_environment(Parser & p, ostream & os, bool outer, parent_context.check_layout(os); handle_ert(os, "\\begin{" + name + "}{" + encoding + "}{" + mapping + "}", parent_context); - // we must parse the content as verbatim because e.g. SJIS can contain + // we must parse the content as verbatim because e.g. JIS can contain // normally invalid characters string const s = p.plainEnvironment("CJK"); for (string::const_iterator it = s.begin(), et = s.end(); it != et; ++it) { @@ -1453,7 +1456,6 @@ void parse_environment(Parser & p, ostream & os, bool outer, else os << *it; } - p.skip_spaces(); handle_ert(os, "\\end{" + name + "}", parent_context); } else {