ftfy - fix unicode that's broken in various ways

Paste in some unicode text that appears to be broken and this tool will use the ftfy Python library to try and fix it.

import ftfy.bad_codecs  # enables sloppy- codecs
from ftfy.fixes import replace_lossy_sequences
s = 'Ã\x83¢ââ\x82¬ï¿½Ã¢â\x82¬â\x84¢(Ã\x83¢Ã\x85â\x80\x99Ã\x82£Ã\x83â\x80¹Ã¢â\x82¬ÂºÃ\x83¢Ã\x85â\x80\x99Ã\x82£)Ã\x83¢ââ\x82¬ï¿½Ã\x85½'
s = s.encode('latin-1')
s = s.decode('utf-8')
s = s.encode('sloppy-windows-1252')
s = replace_lossy_sequences(s)
s = s.decode('utf-8')
s = s.encode('sloppy-windows-1252')
s = replace_lossy_sequences(s)
s = s.decode('utf-8')
print(s)

Examples

Web app source code on GitHub