Re: Started porting UDD to Python3 (Was: [UDD] Is there some effort to port UDD to Python3?)
- To: Stéphane Blondon <stephane.blondon@gmail.com>
- Cc: Mattia Rizzolo <mattia@debian.org>, 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: Andreas Tille <andreas@an3as.eu>
- Date: Fri, 15 May 2020 21:10:33 +0200
- Message-id: <[🔎] 20200515191033.GN550@an3as.eu>
- In-reply-to: <[🔎] bd0a3c2f-ac4f-1f3f-4f37-bd23e95c3d5f@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> <[🔎] bd0a3c2f-ac4f-1f3f-4f37-bd23e95c3d5f@gmail.com>
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
Reply to: