On Wednesday 13 May 2015 10:42:44 Jean-Marc Lasgouttes wrote: > I guess we are still waiting for some python 3.3 goodness from José, but > what else?
The reason why I am a bit stuck here is due to the nature of string handling on python3. Python 3 requires that when we open a file to already know the encoding or else to treat the file as binary that is composed of bytes. And bytes and strings do not talk to each other directly. Usually this is not a problem since for modern lyx (after 1.6? ) all files are utf8. The problem comes from older files than can have other encodings. For those we need to read the preamble, determine the encoding, and then reopen the file as a text file with that encoding. The reason why I am stuck (since I am busy with other issues) is because I would like to do this in a way that the changes are minimal and such that as soon as we remove python 2 support the changes are equally non-invasive. With a little bit of care that has been possible for all the other issues so that the code is native to both 2 and 3, in the sense that it does not look like an horrible contraption for each version. I have on my immediate todo list to generate a list of files where changes are needed on what is the status for each file as you proposed in a tracker issue. Regards, -- José Abílio
