Am 12.05.2017 um 11:32 schrieb José Abílio Matos <jama...@lyx.org>:
> 
> On Thursday, 11 May 2017 14.26.37 WEST Jürgen Spitzmüller wrote:
>> 2017-05-11 12:51 GMT+02:00 José Abílio Matos <jama...@lyx.org>:
>>> I will look into this problem if we have a bug report for it and a simple
>>> example file.
>> 
>> http://www.lyx.org/trac/ticket/10660
>> 
>> Jürgen
>> 
>>> --
>>> José Abílio
> 
> Thank you.
> 
> First I will blame Stephan (at least according to git). ;-)

Yes, I put in in. (And you luckily hit a Friday to place your smiley :-) )

I’m not so easy with your proposal to remove the error handler.
I think we have a real problem here: the encoding of the path names
in preferences is undefined if I’m not mistaken.

Of course we have to fix it in some way - but I don’t know enough
of python (obviously) to make the right proposal.

Stephan

> 
> The problem is:
> 
> LookupError: unknown error handler name 'surrogateescape'
> 
> according to PEP383:
> https://www.python.org/dev/peps/pep-0383/
> 
> this error handler was only introduced in python 3 and so it makes sense the 
> error seen by Andrew.
> 
> 
> OTHO both Stephan and I (and probably others) do not see this problem with 
> python 2, so probably the error handler was backported to python 2.
> 
> 
> So I suggest to remove for the moment the error argument from the io.open 
> call.
> 
> Also according to Nick Coghlan (python core member):
> http://python-notes.curiousefficiency.org/en/latest/python3/
> text_file_processing.html
> 
> "surrogate escape ... is the error handler that Python uses for most OS 
> facing 
> APIs to gracefully cope with encoding problems in the data supplied by the 
> OS."
> 
> so I think that we should be safe here.
> 
> -- 
> José Abílio

Reply via email to