Hacker News new | ask | show | jobs
by rainonmoon 1615 days ago
Sometimes it can detect quite a lot more than 2-3 levels! The "magic" function really feels like it earns its name.
1 comments

If you like that, try FTFY https://ftfy.readthedocs.io/en/latest/ which can automatically repair a huge range of ways that Unicode text can be broken by re-encoding. This would be a great addition to CyberChef if they could reproduce it in JS.

Classic example from the docs:

> ftfy can fix multiple layers of mojibake simultaneously:

    >>> ftfy.fix_text('The Mona Lisa doesn’t have eyebrows.')
    "The Mona Lisa doesn't have eyebrows."