Fix attempt for unicode bug #1137 **PYTHON 2 ONLY** (rebase of #1179)

New pull request because Github just doesn't get rebases. Original: #1179

2013-08-31, remram44:
> This should probably be made to work on Python 3 first... I see nothing in six.py to help, though.

Still need tweaking to work with Python 3.