Skip to main content

Encoding conversion utilities based on chardet.

Project description

Enconv

A light wrapper around chardet to conveniently convert text files.

Install

Optionally create virtual env

~$ pip install enconv

Usage

enconv: Guess and convert between encodings

usage: enconv.py [-h] [-ie INPUT_ENCODING] [-gl GUESS_LENGTH]
                 [-oe OUTPUT_ENCODING] [-of OUTPUT_FILE] [-ow]
                 input_file

enportal: Guess and convert file encodings from source to destination folders

usage: enportal [-h] [-ie INPUT_ENCODING] [-gl GUESS_LENGTH]
                [-oe OUTPUT_ENCODING] [-ow] [-i INTERVAL]
                input_dir output_dir

encheck: Guess text encoding of files in folder

usage: encheck [-h] [-gl GUESS_LENGTH] input_dir

Example

~$ enconv /Users/me/Downloads/chinese.txt
Guess: {'encoding': 'GB2312', 'confidence': 0.99, 'language': 'Chinese'}
Wrote to /Users/me/Downloads/chinese.txt.utf-8 in utf-8

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enconv-0.0.3.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

enconv-0.0.3-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page