Character encoding detecting library for Python using ICU and libmagic.
Project description
# Charlock Holmes [](https://travis-ci.org/xtao/PyCharlockHolmes)
Character encoding detecting library for Python using [ICU](http://site.icu-project.org/) and libmagic. Inspired by [Charlock Holmes](https://raw.github.com/brianmario/charlock_holmes)
## Dependency 1. icu 2. file(libmagic)
- ### Gentoo
emerge -av dev-libs/icu emerge -av sys-apps/file
- ### Ubuntu
apt-get install libicu-dev apt-get install libmagic-dev
- ### Brew
brew install icu4c brew install libmagic export ICUI18N=”/usr/local/Cellar/icu4c/xx” # Replace “xx” as the version of your icu export MAGIC=”/usr/local/Cellar/libmagic/xx” # Replace “xx” as the version of your libmagic
## Install
python setup build python setup install
## Usage
from charlockholmes import detect file = open(‘test.txt’) content = file.read() print detect(content)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file charlockholmes-0.0.2.tar.gz.
File metadata
- Download URL: charlockholmes-0.0.2.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57da1d8289859382919b9f3e567b2c6d5693029f05d7f07ac5c9b013d04e50c2
|
|
| MD5 |
12b74828839936e8b32038b0f693d022
|
|
| BLAKE2b-256 |
5330b3a30b120ac724879b4761d73ec1dc702f281ad0e5776224e3826e9e4a41
|