- // If we have a custom encoding for the buffer, we only switch
- // encoding for CJK (see output_latex::switchEncoding())
- bool const customenc =
- bp.inputenc != "auto" && bp.inputenc != "default";
- Encoding const * enc =
- (customenc && lang->encoding()->package() != Encoding::CJK)
- ? &bp.encoding() : lang->encoding();
+ // If we have a custom encoding for the buffer, we don't switch
+ // encodings (see output_latex::switchEncoding())
+ bool const customenc = bp.inputenc != "auto-legacy" && bp.inputenc != "auto-legacy-plain";
+ Encoding const * enc = customenc ? &bp.encoding() : lang->encoding();