urllib.quote and unicode

Kelly kkranabetter at yahoo.com
Thu Dec 5 20:07:32 EST 2002


Urllib's quoting of Unicode characters doesn't seem to work right in Python 
2.2.1:

>>> urllib.quote(unichr(8225))    # double dagger
'%2021'
>>> urllib.unquote("%2021")
' 21'

I couldn't find anything very useful on the web about quoting Unicode but 
Microsoft IIS does understand Unicode characters when quoted like: 
"%u2021".

Kelly



More information about the Python-list mailing list