From 148469164018b7b520088c2943dd77b3d77e821b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Tue, 9 Oct 2007 22:26:17 +0000 Subject: [PATCH] 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 --- src/BufferParams.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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(); -- 2.39.2