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 restore_byte_a0 s = 'Ð\xa0 Сâ\x80\x94Ð\xa0Ð\x8eÐ\xa0â\x80\x9aÐ\xa0 Сâ\x80\x98Ð\xa0Ð\x8eÐ\xa0Ð\x8fÐ\xa0Ð\x8eвÐ\x82Ñ\x99Ð\xa0 Ð\xa0â\x80¦Ð\xa0 Сâ\x80¢Ð\xa0Ð\x8eÐ\xa0Ñ\x93Ð\xa0Ð\x8eвÐ\x82Ñ\x99Ð\xa0 Сâ\x80\x98. Ð\xa0Ð\x86СÑ\x9aÐ\x92¤' s = s.encode('latin-1') s = s.decode('utf-8') s = s.encode('sloppy-windows-1251') s = restore_byte_a0(s) s = s.decode('utf-8') s = s.encode('sloppy-windows-1251') s = s.decode('utf-8') print(s)
Web app source code on GitHub