+ // for Japanese we assume EUC-JP as encoding
+ // but we cannot determine the exact encoding and thus output also a note
+ if (h_language == "japanese") {
+ h_inputencoding = "euc";
+ p.setEncoding("EUC-JP");
+ is_nonCJKJapanese = true;
+ // in this case babel can be removed from the preamble
+ registerAutomaticallyLoadedPackage("babel");
+ } else {
+ // If babel is called with options, LyX puts them by default into the
+ // document class options. This works for most languages, except
+ // for Latvian, Lithuanian, Mongolian, Turkmen and Vietnamese and
+ // perhaps in future others.
+ // Therefore keep the babel call as it is as the user might have
+ // reasons for it.
+ h_preamble << "\\usepackage[" << opts << "]{babel}\n";
+ }
+ delete_opt(options, known_languages);