Skip to main content

Character encoding detecting library for Python using ICU and libmagic.

Project description

# Charlock Holmes [![Build Status](https://travis-ci.org/xtao/PyCharlockHolmes.png)](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


Download files

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

Source Distribution

charlockholmes-0.0.2.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file charlockholmes-0.0.2.tar.gz.

File metadata

File hashes

Hashes for charlockholmes-0.0.2.tar.gz
Algorithm Hash digest
SHA256 57da1d8289859382919b9f3e567b2c6d5693029f05d7f07ac5c9b013d04e50c2
MD5 12b74828839936e8b32038b0f693d022
BLAKE2b-256 5330b3a30b120ac724879b4761d73ec1dc702f281ad0e5776224e3826e9e4a41

See more details on using hashes here.

Supported by

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