paris-ci / ftfy-web

Paste in some broken unicode text and FTFY will tell you how to fix it!

Home Page:https://ftfy.now.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ftfy-web

A simple web wrapper around Robyn Speer's FTFY Python library. Paste in some broken unicode text and it will tell you how to fix it!

Try it out at https://ftfy.now.sh/

The tool outputs Python code to fix the input text, for example:

s = "He's Justinâ\x9d¤"
s = s.encode('latin-1')
s = s.decode('utf-8')
print(s)

In some cases it will output additional imports from the ftfy package, for example:

import ftfy.bad_codecs  # enables sloppy- codecs
from ftfy.fixes import restore_byte_a0
s = 'It was named „scars´ stones“ after the rock-climbers who got hurt while climbing on it.'
s = s.encode('sloppy-windows-1250')
s = restore_byte_a0(s)
s = s.decode('utf-8')
print(s)

About

Paste in some broken unicode text and FTFY will tell you how to fix it!

https://ftfy.now.sh/

License:Apache License 2.0


Languages

Language:Python 96.9%Language:Dockerfile 3.1%