]> git.lyx.org Git - features.git/commitdiff
BufferParams.cpp: empty the encodings when the Japanese plain encodings are used...
authorUwe Stöhr <uwestoehr@web.de>
Tue, 9 Oct 2007 22:26:17 +0000 (22:26 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 9 Oct 2007 22:26:17 +0000 (22:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20879 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp

index e415553e322312fe20025b2dda510b35dbf56252..6f2e3ed3a9dbc18801e7beba3fa5b6842c9ac77d 100644 (file)
@@ -1584,11 +1584,14 @@ void BufferParams::writeEncodingPreamble(odocstream & os,
                std::set<string> 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<string>::const_iterator it = encodings.begin();
                        std::set<string>::const_iterator const end = encodings.end();