Score:0

How to use Ftfy

in flag

I have a xx.sql that has some encoding issues. eg:

represent†in Xhosa)Â

I was advised to use [ftfy to fix] (https://pypi.org/project/ftfy/) I have installed pip install ftfy but for the sake of me cannot comprehend how to use it for example:

in terminal these are the commands i run :

python 
import ftfy
ftfy --output=xx.clean.sql xx.orig.sql (not sure how to point to the location of xx.orig.sql)

I feel like it is something simple that i am missing any help with this would be appreciated.

Thank you

Score:0
in flag

These are directions for Ubuntu 18.04 that i used for my solution.

apt install python3
apt install python-pip3
pip3 install ftfy

cd /usr/local/lib/python3.6/dist-packages/ftfy
vim +100 cli.py

Changes to file bold part

if args.preserve_entities:
    unescape_html = False
else:
    unescape_html = 'auto'

config = TextFixerConfig(
    unescape_html=unescape_html,
    normalization=normalization**,**
    **uncurl_quotes=False**
)

try:
    for line in fix_file(
        file,
        encoding=encoding,
        config=config
/usr/local/lib/python3.6/dist-packages#  ftfy --output=client.clean.sql xxx.sql
#copied the file to same directory
Soren A avatar
mx flag
Is this an answer to your own question, or should it have been an edit to the question ?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.