Am 13.05.2017 um 12:32 schrieb José Abílio Matos <jama...@lyx.org>:
> 
> On Saturday, 13 May 2017 10.50.10 WEST Stephan Witt wrote:
>> Yes, I put in in. (And you luckily hit a Friday to place your smiley  )
> 
> That has never stopped me before. :-D
> 
> My daughter and son follow the same footsteps, some of the other parents said 
> that never saw them not smiling in the morning. That is obviously an 
> exaggeration but the point remains. :-)
> 
>> 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.
> 
> I understand and share your concern. But we were placing those safeguards at 
> the wrong place.
> 
> The encoding of the path names is related with the name of the file and not 
> with its content. The error handler was placed when reading the file and thus 
> is related with its content.

I meant the name of a directory as part of a preference entry.
Isn’t this read and converted by prefs2prefs too?

> 
>> Of course we have to fix it in some way - but I don’t know enough
>> of python (obviously) to make the right proposal.
> 
> FWIW note the we could restore the previous behaviour by doing:
> 
> if PY2:
>    source = io.open(args[0], 'r', encoding='utf_8')
> else:
>    source = io.open(args[0], 'r', encoding='utf_8', errors='surrogateescape')
> 
> with PY2 being defined as usual in the other python files.

Ok, I can take a look - if you want I should do it. (As an exercise?)

Stephan

Reply via email to