On 14/05/2020 21:25, Mattia Rizzolo 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. > On Thu, 14 May 2020, 9:16 pm Stéphane Blondon, <stephane.blon...@gmail.com> > wrote: >> >> `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. Regards, Stéphane
signature.asc
Description: OpenPGP digital signature