Since April 2018, pdflatex falls back to input-encoding utf8 if
it does not detect an input encoding setting.
https://www.latex-project.org/news/latex2e-news/ltnews28.pdf
This leads to failure with CJK legacy encodings and may not
be what you want if selecting "Language Default (no inputenc)"
as document input-encoding.
case Encoding::none:
case Encoding::CJK:
case Encoding::japanese:
+ if (encoding().iconvName() != "UTF-8")
+ // don't default to [utf8]{inputenc} with TeXLive >= 18
+ os << "\\ifdefined\\UseRawInputEncoding\n"
+ << " \\UseRawInputEncoding\\fi\n";
break;
case Encoding::inputenc:
// do not load inputenc if japanese is used
break;
}
}
+ if (inputenc == "default" or features.isRequired("japanese")) {
+ // don't default to [utf8]{inputenc} with TeXLive >= 18
+ os << "\\ifdefined\\UseRawInputEncoding\n";
+ os << " \\UseRawInputEncoding\\fi\n";
+ }
}