On 2016-12-06, Jürgen Spitzmüller wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> Am Mittwoch, den 30.11.2016, 12:28 +0000 schrieb Guenter Milde:
>> File format change?

> definitely.

>> IMV, this cannot be improved with a file format change, hence we
>> don't
>> need one.

> Well, you need at least to replace the removed encodings with something
> sensible on conversion. Without a file format change, you'll get a
> parsing error.

However, the parsing error is harmless as the workaround is already "the
right thing". Just try:

1. Take a *.lyx file and in a text editor change, e.g.

      \inputencoding auto

   to

      \inputencoding unsupported-encoding

2. open the file in LyX

   I get the message

     BufferParams.cpp (3218): Unknown inputenc value `unsupported-encoding'.
     Using `auto' instead.

   in the terminal and the document opens just fine and compiles without
   problems.


Furthermore, LyX documents with "\inputencoding pt254" are a very rare case
(maybe even nonexisting):

* Due to missing "iconv" support, there are no documents with this setting
  generated by tex2lyx.

  The minimal example

    \documentclass{article}
    \usepackage[pt254]{inputenc}
    \begin{document} Test me. \end{document}

  compiles with pdflatex without problem, but tex2lyx fails with

    #> tex2lyx pt254.tex
    Creating file /tmp/pt254.lyx
    Error 22 returned from iconv_open(in_cd_): Das Argument ist ungültig
    terminate called after throwing an instance of 
'lyx::iconv_codecvt_facet_exception'
      what():  iconv problem in iconv_codecvt_facet initialization
    Abgebrochen
    
  (in the times when LyX did not use iconv but tables in lib/encodings, the
   encoding pt254 was not yet supported).


* As documents with setting "\inputencoding pt254" fail to export to/with
  (8-bit) LaTeX (other exports ignore the setting), it is very unlikely
  someone will have set this encoding "by hand" and kept it so.
  
For eventually existing rare cases, it is very hard to guess what would be a
"sensible value": 
  * someone setting inputencoding away from "auto" to an
    Cyrillic-Asian-Mac 8-bit encoding may not be served well with any
    auto-guessed replacement.
    
In any case, I don't think it is worth the effort.

Günter    

Reply via email to