Unicode support in Python: Frustrations and Solutions

To be honest, I think the support of unicode in Python before Python 3, being totally honest, is a f*knig nightmare. I prefer PHP 5.x support for unicode (= zero support).

One can get just crazy, sometimes things work, sometimes things crash somewhere unexpectly, or they don’t really crash, they just crash when you want to show some string on the console doing a print…

Anyway, trying to solve my frustrations with unicode strings in Python I found a link that explains lots of things and helped me a lot:

Overcoming unicode frustrations in Python 2

The previous link is a must read for people getting UnicodeEncodeError exceptions, like:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 654: ordinal not in range(128)

Finally, my hope is that Python 3 solves all the evil in the world of the unicode… but I need to see it working to truly believe what I’ve been reading so far…

Trackback URL

, , ,

Comments are closed.