Fwd: String/Bytes Problem in layout2layout.py

José Abílio Matos jamatos at lyx.org
Mon Jan 3 18:32:14 UTC 2022


On Monday, 3 January 2022 16.02.51 WET Pavel Sanda wrote:
> On Mon, Jan 03, 2022 at 03:16:47PM +0000, José Abílio Matos wrote:
> > If you want I can take care of that, in 2.4, and see if there are cases
> > where the conversion is missing.
> 
> Please do, I suffer from ophidiophobia.

You keep insisting that the Norwegian Blue parrot is alive: :-D
https://en.wikipedia.org/wiki/Dead_Parrot_sketch

The name comes from the Monty Python's Flying Circus. :-)

In any case I found other cases where the code is wrong (like the BOM removal 
that does not work) and that it does not give an error although it is wrong.

The patch follows attached since I do not have time to test it.

> > @Riki: is it possible to have a layout file such that the encoding is not
> > utf-8?
> 
> The original reports most likely downloaded layouts referred in our wiki
> (https://wiki.lyx.org/Layouts/Layouts , LyXBook), so I guess that layout
> encoding is not in our hands.

No the issue is if LyX accepts, or not, other encoding that UTF-8. If not all 
the care is useless. Looking to the similar pref2prefs.py we see that it 
assumes utf-8.

> Pavel


-- 
José Abílio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220103/ca816361/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout2layout.patch
Type: text/x-patch
Size: 2774 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220103/ca816361/attachment.bin>


More information about the lyx-devel mailing list