On Fri, May 15, 2020 at 08:51:05PM +0200, Stéphane Blondon wrote: > > And, ideally, somebody would contact whoever is providing that file so that > > they re-encode it with utf8... > > Yes, it's the best long term solution.
Definitely. But who is providing that file? > >> `f = open(trfile, encoding='latin-1')` > >> > >> could be a (temporary?) solution. > > Andreas, it's possible that changing the encoding will fix the bug for > some files but you will get new errors on other files (encoded in > utf-8). Trying several encoding or using 'chardet' library could be a > better workaround. Would you mind providing a patch with chardet? Kind regards Andreas. -- http://fam-tille.de