On Mon, 2025-08-04 at 12:20 +0200, Adrien Rebollo wrote:
> Hello,
> 
> I ran into trouble trying to open very old LyX files that were in latin9 or
> latin1 encoding.
> Here are two specific situations that gave me some headache, with suggestions
> for improvement.

I will reply to each situation in a different message, for simplicity. :-)

> -- Situation 1 --
> 
> Procedure:
> - open a very old LyX 1.4 file saved in latin9 (or latin1) encoding
> - make a minor modification and save, so that the file is converted to the new
> lyx file format
> 
> Current behaviour:
> - the resulting file is silently converted to utf8 encoding, as described by
> the "file" command or a text editor
> - the file is still described as latin9, via the line "\inputencoding iso8859-
> 15" in the lyx file
> 
> Consequence:
> - everything works fine, except that the tex export is latin9

Notice that there are two different encodings here:
* the first is related with the file encoding;
* the second is the encoding of the exported (latex) file.

Do not mix both. :-)

The encoding of the file is an implementation detail.

> Solution:
> - manually set the encoding to UTF-8 via the menus, but this is tedious when
> working with many files
> 
> Expected behaviour:
> - warn the user of the conversion and ask if the file must still be declared
> as latin9

The conversion should always be automatic.
The conversion between encoding is controlled by lyx or lyx2lyx.

> - OR switch encoding to "auto" or "utf8" when performing encoding conversion
> on very old files (pre-LyX 2.1 ?)

This is supposed to happen, if it does not work then this is bug that needs to
be fixed. The transition to utf-8 was done in 1.6 (IIRC).

I will look into this issue.

Regards and thank you for the report, :-)
-- 
José Abílio
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to