Kent,
Thanks so much. It's easy when you know how. Now that I know, I only need
the encode('utf-8') step since geopy does the urlencode step.
On Thu, 17 May 2007, Kent Johnson wrote:
> It's two steps. First convert to utf-8, then urlencode:
>>>> c = u'\xe2'
>>>> c
> u'\xe2'
>>>> c.encode('utf-8')
> '\xc3\xa2'
>>>> import urllib
>>>> urllib.quote(c.encode('utf-8'))
> '%C3%A2'
>
> Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor