libb.fix_text
- fix_text(text)[source]
Use ftfy magic to fix text encoding issues.
Example:
>>> fix_text('âœ" No problems') '✔ No problems' >>> print(fix_text("¯\\_(ã\x83\x84)_/¯")) ¯\_(ツ)_/¯ >>> fix_text('Broken text… it’s flubberific!') "Broken text… it's flubberific!" >>> fix_text('LOUD NOISES') 'LOUD NOISES'