3 ms·
Here's the heuridtic-based hypothesis of the python package ftfy >>> ftfy.fix_and_explain("’") ExplainedText( text="'", explanation=
by iudqnolq 5y ago
Here's the heuridtic-based hypothesis of the python package ftfy
>>> ftfy.fix_and_explain("’")
ExplainedText(
text="'",
explanation=[
('encode', 'sloppy-windows-1252'),
('decode', 'utf-8'),
('apply', 'uncurl_quotes')
]
)
- wolfgang42 5y agoNote that uncurl_quotes is a FTFY fix unrelated to character encoding, it’s basically just s/’/'/. (FTFY turns all of its fixes on by default, which sometimes results in it doing more than you might want it to.) You can play around with FTFY here (open the “Decoding steps” to see the explanation of what it did and why): https://www.linestarve.com/tools/mojibake/?mojibake=’ https://www.linestarve.com/tools/mojibake/?mojibake=’
- deleted 5y ago[deleted]
- iudqnolq 5y agoThanks!