urllib.urlencode wrongly encoding ± character

sleytr at gmail.com sleytr at gmail.com
Wed Apr 5 21:34:10 EDT 2006


Hi,  I'm trying to make a gui for a web service. Site using ±
character in value of some fields. But I can't encode this character
properly.


>>> data = {'key':'±'}
>>> urllib.urlencode(data)
'key=%C2%B1'

but it should be only %B1 not %C2%B1. where is this %C2 coming from?




More information about the Python-list mailing list