From: Uwe Stöhr Date: Tue, 9 Oct 2007 22:26:17 +0000 (+0000) Subject: BufferParams.cpp: empty the encodings when the Japanese plain encodings are used... X-Git-Tag: 1.6.10~7913 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=148469164018b7b520088c2943dd77b3d77e821b;p=features.git BufferParams.cpp: empty the encodings when the Japanese plain encodings are used to prevent that inputenc is used (according to the suggestion by JMarc) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20879 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index e415553e32..6f2e3ed3a9 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1584,11 +1584,14 @@ void BufferParams::writeEncodingPreamble(odocstream & os, std::set encodings = features.getEncodingSet(doc_encoding); - // When the language japanese-plain is used, the package inputenc must - // be omitted. + // When the encodings EUC-JP-plain, JIS-plain, or SJIS-plainare used, the + // package inputenc must be omitted. Therefore set the encoding to empty. // see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129680.html - if ((!encodings.empty() || package == Encoding::inputenc) && - language->lang() != "japanese-plain") { + if (doc_encoding == "EUC-JP-plain" || doc_encoding == "JIS-plain" || + doc_encoding == "SJIS-plain") + encodings.clear(); + + if (!encodings.empty() || package == Encoding::inputenc) { os << "\\usepackage["; std::set::const_iterator it = encodings.begin(); std::set::const_iterator const end = encodings.end();