Re: [Tutor] urllib.urlencode and unicode strings

2007-05-18 Thread Jon Crump
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

Re: [Tutor] urllib.urlencode and unicode strings

2007-05-17 Thread Kent Johnson
Jon Crump wrote: > Dear all, > > I've got a python list of data pulled via ElementTree from an xml file > that contains mixed str and unicode > strings, like this: > > [u'Jumi\xe9ge, Normandie', 'Farringdon, Hampshire', 'Ravensworth, > Durham', 'La Suse, Anjou', 'Lions, Normandie', 'Lincoln,

[Tutor] urllib.urlencode and unicode strings

2007-05-17 Thread Jon Crump
Dear all, I've got a python list of data pulled via ElementTree from an xml file that contains mixed str and unicode strings, like this: [u'Jumi\xe9ge, Normandie', 'Farringdon, Hampshire', 'Ravensworth, Durham', 'La Suse, Anjou', 'Lions, Normandie', 'Lincoln, Lincolnshire', 'Chelmsford, Esse