Python 3.1, trying to unescape html/unicode/xml characters
- by Sho Minamimoto
I found my problem here, but there is only an answer for Python 2.6. Basically, I need to unescape strings such as this: 'a altieri_joão' to show the proper characters.
http://stackoverflow.com/questions/990169/how-do-convert-unicode-escape-sequences-to-unicode-characters-in-a-python-string
I need to do this in 3.1, but when I try
print (u'a altieri_joão')
if gives me invalid syntax. And when I try
name.decode('latin-1')
it says 'str' has no method 'decode'.