windows preview bug fix

José Matos jaomatos at gmail.com
Sat Feb 24 21:38:49 UTC 2024


On Sat, 2024-02-24 at 21:51 +0100, Enrico Forestieri wrote:
> Wanting to be very safe, we could use te chardet library for
> performing the correct conversion, but if the above is the standard
> with python 3 on windows I don't think it is necessary.

In [1]: help(str)
...
str(object='') -> str
str(bytes_or_buffer[, encoding[, errors]]) -> str
...
encoding defaults to sys.getdefaultencoding().
errors defaults to 'strict'.
...
In [2]: import sys
        sys.getdefaultencoding()
Out[2]: 'utf-8'

So probably this should work more time than what I was expecting. :-)

This is unexpected and welcome. :-)
-- 
José Abílio


More information about the lyx-devel mailing list