On Mon, 2025-08-04 at 12:20 +0200, Adrien Rebollo wrote: > -- Situation 2, trying to fix the problem -- > > Procedure: > - manually convert the old LyX 1.4 file to utf8, with iconv or a text editor > - open with LyX > > Current behaviour: > - the text is garbage within LyX, and the document is completely broken > - the raw lyx file is still readable in a text editor > > Solution: > - convert it back with the same tool, but the situation is hard to understand > and the user may run into trouble, ruining many files via batch convert > > Expected behaviour: > - detect the discrepancy (via encoding information and LyX format version), > read the file as UTF-8 without auto-conversion and warn user: > "This file was created with LyX x.x.x in Latin-9 encoding, but it seems to > have been converted later to UTF-8, presumably by an external tool." > > > I've attached a minimal example of a latin9 file created with an old version > of LyX, so you can test the behaviour: > - original: the original latin9 file > - iconv: as converted to utf8 by an external tool
This is a job for lyx2lyx, again if it does not work it should be done there. That lyx files are text files is an implementation detail and are not supposed to be dealt as text files unless you want to delve (no, this was not done by any chat bot) into the lyx file format. I am interested in fixing all those issues, FWIW. Best regards, -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-devel