How do convert unicode escape sequences to unicode characters in a python string
Assuming Python sees the name as a normal string, you’ll first have to decode it to unicode: >>> name ‘Christensen Sk\xf6ld’ >>> unicode(name, ‘latin-1′) u’Christensen Sk\xf6ld’ Another way of achieving this: >>> name.decode(‘latin-1′) u’Christensen Sk\xf6ld’ Note the “u” in front of the string, signalling it is uncode. If you print this, the accented letter is … Read more