geopy/geopy — pull request #43 by rockymeza (2014-03-02 13:51:02+00:00)
Title: Made it possible to geocode non-ascii values in Python2.

This code would throw a UnicodeError in Python2 because urllib.urlencode doesn't support unicode strings.

```python
>>> from geopy.geocoders import OpenMapQuest
>>> geocoder = OpenMapQuest()
>>> geocoder.geocode(u'你好')
```

In order to make this work in my code, I had to encode my unicode string as `utf-8`.

```python
>>> geocoder.geocode(u'你好'.encode('utf-8'))
```

I thought it would be nice if geopy did this for me instead, as it's something that's easy to miss, so I created a version of urlencode (only for Python2) that works more nicely with unicode strings based off of the one that exists in Django.