[EuroPython] Exporting the registration data

Joachim Schmitz js@aixtraware.de
Tue, 28 May 2002 17:20:34 +0200


This is a bug in  xmlrpclib.py

change _decode around line 105 of xmlrpclib.py like so:

def _decode(data, encoding, is8bit=3Dre.compile("[\x80-\xff]").search):
    # decode non-ascii string (if possible)
    if unicode and is8bit(data):
        try:
            data =3D unicode(data, encoding)
        except:
            pass
            #data =3D "error decoding"
    return data





--On Dienstag, Mai 28, 2002 16:24:07 +0200 "M.-A. Lemburg"=20
<mal@lemburg.com> wrote:

> I've hacked up the script Joachim sent to generate CSV, but
> the export still fails with the following errors:
>
> *** failed to fetch item 021481207: UTF-8 decoding error: invalid data
> *** failed to fetch item 02147102801: not well-formed (invalid token):
> line 583, column 16 *** failed to fetch item 021471034: not well-formed
> (invalid token): line 297, column 16 *** failed to fetch item 021381535:
> not well-formed (invalid token): line 297, column 16 *** failed to fetch
> item 021431710: UTF-8 decoding error: invalid data *** failed to fetch
> item 021371645: not well-formed (invalid token): line 506, column 32 ***
> failed to fetch item 021471421: not well-formed (invalid token): line
> 531, column 16 *** failed to fetch item 021441050: not well-formed
> (invalid token): line 297, column 16 *** failed to fetch item 021450024:
> not well-formed (invalid token): line 583, column 16
>
> This looks like a server side problem to me. Esp. the not
> well-formed errors are disturbing. The server side should use
> Latin-1 as default encoding rather than UTF-8.
>
> --
> Marc-Andre Lemburg
> CEO eGenix.com Software GmbH
> ______________________________________________________________________
> Company & Consulting:                           http://www.egenix.com/
> Python Software:                   http://www.egenix.com/files/python/
> Meet us at EuroPython 2002:                 http://www.europython.org/
>



Mit freundlichen Gr=FC=DFen                              Joachim Schmitz
--------------------------------------------------------------------
AixtraWare Ingenieurb=FCro f=FCr Internetanwendungen
H=FCsgenstr. 33a, D-52457 Aldenhoven
Telefon: +49-2464-8851, FAX: +49-2464-905163
--------------------------------------------------------------------
Key fingerprint =3D DA10 CC82 62F8 1DBB 39A1  1EDC 725B 3317 A8D7 C3A6
Keyserver: http://www.keyserver.net/en/