ftfy - fix unicode that's broken in various ways


from ftfy.fixes import restore_byte_a0
s = 'hihi RT username: â\x98ºí ½í¸\x98'
s = s.encode('latin-1')
s = restore_byte_a0(s)
s = s.decode('utf-8-variants')


Web app source code on GitHub