On Tue, May 09, 2017 at 08:22:08PM +1200, Andrew Parsloe wrote:

> The problem was with a customized copy of cua.bind in my LyX2.3/bind folder.
> prefs2prefs.py was stumbling on it. After much blundering about I found the
> problem was an encoding one. The customized cua.bind dates from many years
> ago and (according to my text editor) the encoding is ANSI rather utf8.
> prefs2prefs.py choked at
> 
> line 52 in read: lines = source.read().splitlines() or ['']
> 
> Python27/lib/codecs.py, line 314, in decode
>       (result, consumed) = self._buffer_decode(data, self.errors, final)
> LookupError: unknown error handler name 'surrogateescape'
> 
> I have updated the customized cua.bind, now encoded in utf8, and the problem
> has vanished.

Nice work! I have no idea how to improve our read of different
encodings. I'm guessing this issue is not so rare for users who manually
edit the preferences files with various text editors that for some
reason do not preserve encodings. If you happen to have your old
preferences file, or can recreate the situation, you might want to post
a bug report with a small preferences file.

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to