On 2019-03-29, Jürgen Spitzmüller wrote:
> Am Freitag, den 29.03.2019, 10:03 +0000 schrieb Guenter Milde:

>> > So with your solution a significant group of users will stick with
>> > 8bit encodings forever.

>> This is easily solved by changing the default default:

>> diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
>> index de46966f2e..028889cd66 100644
>> --- a/src/BufferParams.cpp
>> +++ b/src/BufferParams.cpp
>> @@ -425,7 +425,7 @@ BufferParams::BufferParams()
>>      fonts_sans_scale[1] = 100;
>>      fonts_typewriter_scale[0] = 100;
>>      fonts_typewriter_scale[1] = 100;
>> -    inputenc = "auto";
>> +    inputenc = "utf8";
>>      lang_package = "default";
>>      graphics_driver = "default";
>>      default_output_format = "default";

> This is just even more finger-painting.
> You basically want to defunc auto.

I want to bypass "auto" in order to keep its functionality as-is:

* Currently, the "auto" setting basically¹ means

    use a mix of fixed-width 8-bit encodings

  For documents with languages using the Latin, Greek, Cyrillic, and
  Hebrew script, this allows to encode all supportedt letters even in
  cases where utf8 would break something.
  
  ¹ For some languages it will be a mix of fixed-width and variable-width
    encodings (10 out of the 82 languages with Babel support use
    utf8 or legacy variable-width encodings.)

* When changing Encodings in lib/languages, "auto" becomes basically an
  alias for "utf8", because "utf8" will be the new default for all²
  languages.
  
  ² Only "Japanese (platex)" currently requires "utf8-platex".

* With my proposal, the "auto" setting is kept available as-is but not
  used for new documents (unless set in a custom template).
  
  To make clear that this is now a legacy setting, it may be renamed.
  (We could also rename "Encoding" in lib/languages to something like
  "LegacyInputEncoding".)


>> > I have this on my agenda, and I will definitely go on to change
>> > languages for 2.4.0, so be aware that all work you do on templates
>> > might be wasted time.

>> Please don't force this unless 

>> a) it does not break any tests, or
>> b) a majority of developers agree that it is OK to break these tests.

> I will. If tests break, we can fix the cause. 

The proposed format conversion ("auto" to current buffer default
encoding) will break the export tests for
autotests/export/latex/CJK/en-de-el-ru-zh_CN_language-default.lyx and
autotests/export/latex/en-ar_language-default.lyx.  Try compiling
after changing the inputencoding to "Western European (ISO 8859-15)"
manually. 

If going ahead with a file format change, please do the changes in a
feature branch, because reverting a file format change is not nice.

> In any case, just painting over the language's default encoding
> everywhere is not a sane solution.

In my opinion, using "utf8" instead of the language's legacy default
encoding for all languages is simple and sane.

Günter

Reply via email to