Dear Jürgen, dear LyX developers,
On 2019-03-30, Jürgen Spitzmüller wrote:
> After some more pondering, here is a proposal that, I think, addresses
> my and your concerns:
> * We keep the "auto" functionality as is (selecting the appropriate
> 8bit encoding), but rename it (e.g., to \inputencoding traditional).
Done in 27ba6f282d.
> * We introduce a new default encoding, \inputencoding uni.
Possibly not required, see below.
> * In languages, we keep the 8bit encodings, but rename Encoding to
> TradEncoding, introduce language.tradEncoding() and basically replace
> all current calls to encoding().
Possibly not required, see below.
> * Encoding now defaults to utf8, but it can be set to override this for
> a given language (e.g., Japanese).
All languages supported by Babel now also support "\inputencoding utf8"
(see autotests/export/latex/languages/supported-languages.lyx: changing the
input encoding to utf8 works).
The problematic languages were:
Hebrew:
new "unicodesymbols", forced for "utf8" (missing support with inputenc)
Japanese (platex):
the combination of "\language japanese" and "\inputencoding utf8" sets
the buffer input encoding to "utf8-platex".
Thai:
new "unicodesymbols", forced for "utf8" (missing support with inputenc)
> * \inputencoding uni selects language->encoding().
"uni" can be set to "utf8" for all languages.
A separate setting is only sensible, if there is consensus that
LyX should default to legacy encodings or utf8x.
This would avoid LICR replacements with Thai/Hebrew and TeX-fonts.
However:
* Hebrew is preferably used with non-TeX fonts anyway,
* inputenc "utf8" support for Thai and Hebrew will be in CTAN soon,
* "utf8x" clashes with some packages.
* "supported-languages.lyx" revealed some bugs with the automatic
input encoding switches that would become irrelevant with a
document-wide input encoding. For mixed-language documents, "utf8"
is better suited than any of the legacy encodings.
> In the GUI, we get rid of the two radio boxes and add a combo instead
> with
...
> Unicode (Default) is \inputencoding uni and the new default.
Suggestion for Document>Settings>Language:
Encoding: (x) Unicode (utf8)
( ) ASCII
( ) [ Legacy language default (mixed) ]
Unicode (utf8) is "utf8".
The third line is a drop-down list. It should start with the special
"auto-legacy" and "auto-legacy-plain" mixed-encodings and then add the
encodings in lib/encodings (except inherit and ASCII).
This would make the three most often used encodings (utf8, ascii, and
auto-legacy) easily available.
> In lyx2lyx, we:
> * convert/revert \inputencoding auto <-> traditional
Done.
> * \inputencoding utf8 or utf8-platex <-> uni (for all languages that
> have that)
Possibly not required, because "uni" can be "utf8" for all languages.
We may add "utf8" -> "utf8-platex" in the back-conversion of Japanese
(platex) documents.
> We can do all this in subsequent steps.
> That way, we don't lose the old functionality, but we make clear that
> we have a new default.
Yes.
Günter