[Python-Dev] urllib.quote and unicode bug resuscitation attempt

skip at pobox.com skip at pobox.com
Tue Jul 11 16:35:55 CEST 2006


    Stefan> According to a message I found on quixote-users,
    Stefan> http://mail.mems-exchange.org/durusmail/quixote-users/5363/ it
    Stefan> might have worked prior to 2.4.2.

Confirmed with 2.3.5.

    Stefan>    if isinstance(s, unicode):
    Stefan>        s = s.encode('utf-8')

    Stefan> as suggested in
    Stefan> http://www.w3.org/International/O-URL-code.html
    Stefan> and rfc3986.

Seems like the right way to do it to me.

Skip


More information about the Python-Dev mailing list