bowmanjd / python-chardet-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-chardet-example

Associate code example for Character Encodings and Detection with Python, chardet, and cchardet.

Installation

Clone this repository, then cd into the directory.

I suggest creating a virtual environment and installing cchardet. Something like the following should work:

python3 -m venv .venv
. .venv/bin/activate
pip install cchardet

If new to virtual environments, feel free to read my article on the subject.

Usage

python detect.py sample-latin1.csv

The code assumes Python 3. You may need to use python3 in place of python above.

Feel free to use your own text files, and analyze and adapt the code.

Contributing

Please feel free to submit pull requests and/or open issues.

License

Copyright 2020 Jonathan Bowman. All documentation and code contained in this repository may be freely shared in compliance with the Apache License, Version 2.0, and is provided “AS IS” without warranties or conditions of any kind.

About

License:Apache License 2.0


Languages

Language:Python 100.0%