Universal encoding detector. This library is faster than chardet.
Project description
cChardet
cChardet is high speed universal character encoding detector. - binding to charsetdetect.
Support codecs
Big5
EUC-JP
EUC-KR
GB18030
HZ-GB-2312
IBM855
IBM866
ISO-2022-CN
ISO-2022-JP
ISO-2022-KR
ISO-8859-2
ISO-8859-5
ISO-8859-7
ISO-8859-8
KOI8-R
Shift_JIS
TIS-620
UTF-8
UTF-16BE
UTF-16LE
UTF-32BE
UTF-32LE
WINDOWS-1250
WINDOWS-1251
WINDOWS-1252
WINDOWS-1253
WINDOWS-1255
EUC-TW
X-ISO-10646-UCS-4-2143
X-ISO-10646-UCS-4-3412
x-mac-cyrillic
Requirements
Example
# -*- coding: utf-8 -*-
import cchardet as chardet
with open(r"src/tests/testdata/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f:
msg = f.read()
result = chardet.detect(msg)
print(result)
Benchmark
$ cd src/
$ pip install chardet
$ python tests/bench.py
Results
CPU: Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz
RAM: DDR3 1600Mhz 16GB
Platform: Ubuntu 16.04 amd64
Python 2.7.12
Request (call/s) |
|
---|---|
chardet |
0.26 |
cchardet |
1408.73 |
Python 3.5.2
Request (call/s) |
|
---|---|
chardet |
0.28 |
cchardet |
1380.40 |
License
The MIT License: src/cchardet
Other Libraries License: Please, look at the src/ext directory.
Thanks
Contact
CHANGES
1.1.2 (2017-01-08)
Support Python 3.6
1.1.1 (2016-11-05)
Use len() function (9e61cb9e96b138b0d18e5f9e013e144202ae4067)
Remove detect function in _cchardet.pyx (25b581294fc0ae8f686ac9972c8549666766f695)
Support manylinux1 wheel
1.1.0 (2016-10-17)
Add Detector class
Improve unit tests
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
Built Distributions
Hashes for cchardet-1.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8609bef151f3e51405bdd889ca131853d0da7a1228c753dbaa03f7f0f2021161 |
|
MD5 | 312d85bc10a4e3a4a2aeeb4048f936f5 |
|
BLAKE2b-256 | ccab728a11ce09c3b379467ff954443aa2e0c032e091c3ec0772595e2f4d6dcd |
Hashes for cchardet-1.1.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46bfb21a27073f303c85a6a7b6b22b7d4aa124bd195b675898cb67e93590a5f |
|
MD5 | fd6008beb50e85b8e27280345b7f3081 |
|
BLAKE2b-256 | 3c5b4f4d7f45a78f7fde85e52e5def3596bc3ca0ca437af991b63247ff3b5e58 |
Hashes for cchardet-1.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4c17c180132bc106cc245f1ef979429d592826f095b25411e08b3e01d9f7b3 |
|
MD5 | ed1aa2425e47e406b5ca6501a68a61fd |
|
BLAKE2b-256 | 9cd20fc2ec2e8e9ba302edf92c1b42009aa93f3065d3fd4fd2e27e60928688ce |
Hashes for cchardet-1.1.2-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08711446f4c38632da9de941e88a84dcb30917ee111bde6efd9fdd0d4164f91e |
|
MD5 | 967d7634d9056f458356e6d2ba29ca7a |
|
BLAKE2b-256 | e0e11c01c91526d39626cbe0f58057c22ea1e4c72d7c1626fb9e53df635f58e6 |
Hashes for cchardet-1.1.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64eec4239e4f4e7fb0c85d91693783728227099e03c97f9194e5890b4072030d |
|
MD5 | 363691ef903d9d80fbcd3c27123b1b34 |
|
BLAKE2b-256 | 828b65e8c1c0727f6c1c9ac3bc8cb46430d8c6b3d880cce1de01324aa52edd35 |
Hashes for cchardet-1.1.2-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87540999c122b7d9c610209bde76cfc72a3a5222171fd56fc5871ab363f880fa |
|
MD5 | 6792bf046975065527045aaf81affc00 |
|
BLAKE2b-256 | e0d8c60074acd9401210e9c2c5e5def6335007ab378a25e1efb66ee81a9ca61e |
Hashes for cchardet-1.1.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccaa8dd66d67d08ab85bd9b6aa8e1f8ef43eef6dc83636b42f78b8b37c29a63b |
|
MD5 | 0d50c3fc289836982c34e13c11b0d23f |
|
BLAKE2b-256 | 44a1e37690652da88415a63636975fda43610276198b833ab6bdfd8cd5ca842c |
Hashes for cchardet-1.1.2-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00f38209b426e3be9b88c7418f695097407f453835b64cd3a9f353af51ac3d58 |
|
MD5 | 705455a763396fa3fedb940c55876d3e |
|
BLAKE2b-256 | 37263d5a5522a1e822cb689fbbd782f83d72db57d7db9ffa41f09bbb7b7ed4fa |
Hashes for cchardet-1.1.2-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f807bb96e0a79c212a22887496c972b46438d9e6e58067b71784247d9e1e8c49 |
|
MD5 | fcbeababc1c2d231cecbf3337d31d886 |
|
BLAKE2b-256 | a853f6fa63f6a70e873f1fc1e7c055c114f1794b7c3e873654c005b5b3635cba |
Hashes for cchardet-1.1.2-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13cc736cc8467a39caf79fc0b8ca559afcfd5d0a867b1d9cb542bcade76601bd |
|
MD5 | 941104aefcdc6e07fe343829ce14479a |
|
BLAKE2b-256 | 3131f75436cf1c3e4bb25a087cf7b98b55d5ca8526e2afce61d5d0945ec89914 |
Hashes for cchardet-1.1.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8e4b991b40482cef5111ee3bb5043e686dfe3c9ed92c17b45c061c9d008acc |
|
MD5 | a08e463d60f27c3dae26e21bea46e357 |
|
BLAKE2b-256 | d9f6e7e3f62df65945e5660611dea934b1885cc71157b4df68af568232a5eea9 |
Hashes for cchardet-1.1.2-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6bcfaaa4c5d8529802120dfed8e48e771a887f90bdeec65a45122bfc1b2b0f0 |
|
MD5 | 621ea7ee5e1b6b6e88c62e4bda588ab0 |
|
BLAKE2b-256 | 26913e9d84385b255acb07659624fe6c3d55383e371be06b701c0a7d242ec198 |
Hashes for cchardet-1.1.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a72a8e65c94f19c6979e35bc21efe5c66a8060ebe2e9cc8128befb584b83afd9 |
|
MD5 | ff8c8ee47748d684a4df42fbdcda7c2e |
|
BLAKE2b-256 | b92acbd8f956170f1f9e1a8b7b58d7c498941361bde7d11d9daaa7c08d31d2e3 |
Hashes for cchardet-1.1.2-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3c2b538c774aee50f748ec30e65cdc5eee4bafa475ed685ec95be32b1dceefb |
|
MD5 | b2da5697646d8051d59caf99853a21bc |
|
BLAKE2b-256 | dd26a383bdd115150a14ede748a6cbec5acce92b0fdda5da2e5124967b6f6e4e |
Hashes for cchardet-1.1.2-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 140bc963e01fa613723bc24cc5f401ccd1d59ba87da20c9aed28fa21875f6124 |
|
MD5 | c51785d7f85922607e1427610c7c2cf7 |
|
BLAKE2b-256 | 1448d653d0b9cd4a8af14dbdb29b9f2f6ef05044d9824cd7be3b2f7ab3113223 |
Hashes for cchardet-1.1.2-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 098cacf76061d0dc3b2961ca7638f942a21cadb9ee15c5515a2741120ebe5481 |
|
MD5 | 98a2f1778f1d4c099b0f804649b47bae |
|
BLAKE2b-256 | decee0ede192ccc3c92d9ffe9c91492823c2e52883a8506e4f1945236760506e |
Hashes for cchardet-1.1.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c86697c3958b0db232023d83fddf6b919651f7129cf5441259de1db3f533558 |
|
MD5 | 838101b31f91abfda653f85c4de1788f |
|
BLAKE2b-256 | d71d90cb33b5cf751c3e137c71c65b1117b7f96e8913c9450fe3ae73a2797257 |
Hashes for cchardet-1.1.2-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0363805f07b2582d90ef934225b68f73f5b959c73250b8fbb6cca4f12d2964b3 |
|
MD5 | 35c8f8fca7cddd12ef4c71fa4674fb73 |
|
BLAKE2b-256 | 19efd9fad63429c50699ff7b06a007fc01e8d8f90f5b247555acbf4185137830 |