Re: Started porting UDD to Python3 (Was: [UDD] Is there some effort to port UDD to Python3?)
- To: Mattia Rizzolo <mattia@debian.org>
- Cc: Andreas Tille <andreas@an3as.eu>, Lucas Nussbaum <lucas@lucas-nussbaum.net>, Debian QA List <debian-qa@lists.debian.org>, Bas Couwenberg <sebastic@debian.org>, Gianfranco Costamagna <locutusofborg@debian.org>, Ivo De Decker <ivo.dedecker@ugent.be>, kroeckx <kroeckx@debian.org>, laney <laney@debian.org>, Ole Streicher <ole@aip.de>, Paul Wise <pabs@debian.org>, zack <zack@debian.org>
- Subject: Re: Started porting UDD to Python3 (Was: [UDD] Is there some effort to port UDD to Python3?)
- From: Stéphane Blondon <stephane.blondon@gmail.com>
- Date: Fri, 15 May 2020 20:51:05 +0200
- Message-id: <[🔎] bd0a3c2f-ac4f-1f3f-4f37-bd23e95c3d5f@gmail.com>
- In-reply-to: <[🔎] CAHKYmesvv5U3cU5xJB1Puv07AEmTezK4RmgG7y2qO=1ML-7z-g@mail.gmail.com>
- References: <20200401132433.GN20899@an3as.eu> <20200413204007.GB19310@xanadu.blop.info> <20200414064711.GG18187@an3as.eu> <[🔎] 20200513143842.GK550@an3as.eu> <[🔎] 20200513150902.GA1301@xanadu.blop.info> <[🔎] 20200513174056.GM550@an3as.eu> <[🔎] 20200514094332.GU550@an3as.eu> <[🔎] 6d71c868-5420-ad97-cbbc-b92dc800a244@gmail.com> <[🔎] CAHKYmesvv5U3cU5xJB1Puv07AEmTezK4RmgG7y2qO=1ML-7z-g@mail.gmail.com>
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.blondon@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
Attachment:
signature.asc
Description: OpenPGP digital signature
Reply to: