don\'t know wether this is trivial or not, but I\'d need to convert an unicode string to ascii string, and I wouldn\'t like to have all those escape chars around. I mean, is
import unicodedata unicode_string = u"Gavin O’Connor" print unicodedata.normalize('NFKD', unicode_string).encode('ascii','ignore')
Output:
Gavin O'Connor
Here's the document that describes the normalization forms: http://unicode.org/reports/tr15/