跳转到主要内容

cChardet 是一种高速通用字符编码检测器。

项目描述

cChardet

注意:这是一个原始项目的分支,原始项目位于 https://github.com/PyYoshi/cChardet,因为原始项目不再维护。

安装方法

pip install faust-cchardet

cChardet 是一种高速通用字符编码检测器。 - 绑定到 uchardet

PyPI version Build for Linux Build for macOS Build for Windows

支持的语言/编码

  • 国际(Unicode)

    • UTF-8

    • UTF-16BE / UTF-16LE

    • UTF-32BE / UTF-32LE / X-ISO-10646-UCS-4-34121 / X-ISO-10646-UCS-4-21431

  • 阿拉伯语

    • ISO-8859-6

    • WINDOWS-1256

  • 保加利亚语

    • ISO-8859-5

    • WINDOWS-1251

  • 中文

    • ISO-2022-CN

    • BIG5

    • EUC-TW

    • GB18030

    • HZ-GB-2312

  • 克罗地亚语

    • ISO-8859-2

    • ISO-8859-13

    • ISO-8859-16

    • Windows-1250

    • IBM852

    • MAC-CENTRALEUROPE

  • 捷克语

    • Windows-1250

    • ISO-8859-2

    • IBM852

    • MAC-CENTRALEUROPE

  • 丹麦语

    • ISO-8859-1

    • ISO-8859-15

    • WINDOWS-1252

  • 英语

    • ASCII

  • 世界语

    • ISO-8859-3

  • 爱沙尼亚语

    • ISO-8859-4

    • ISO-8859-13

    • ISO-8859-13

    • Windows-1252

    • Windows-1257

  • 芬兰语

    • ISO-8859-1

    • ISO-8859-4

    • ISO-8859-9

    • ISO-8859-13

    • ISO-8859-15

    • WINDOWS-1252

  • 法语

    • ISO-8859-1

    • ISO-8859-15

    • WINDOWS-1252

  • 德语

    • ISO-8859-1

    • WINDOWS-1252

  • 希腊语

    • ISO-8859-7

    • WINDOWS-1253

  • 希伯来语

    • ISO-8859-8

    • WINDOWS-1255

  • 匈牙利语

    • ISO-8859-2

    • WINDOWS-1250

  • 爱尔兰盖尔语

    • ISO-8859-1

    • ISO-8859-9

    • ISO-8859-15

    • WINDOWS-1252

  • 意大利语

    • ISO-8859-1

    • ISO-8859-3

    • ISO-8859-9

    • ISO-8859-15

    • WINDOWS-1252

  • 日语

    • ISO-2022-JP

    • SHIFT_JIS

    • EUC-JP

  • 韩语

    • ISO-2022-KR

    • EUC-KR / UHC

  • 立陶宛语

    • ISO-8859-4

    • ISO-8859-10

    • ISO-8859-13

  • 拉脱维亚语

    • ISO-8859-4

    • ISO-8859-10

    • ISO-8859-13

  • 马耳他语

    • ISO-8859-3

  • 波兰语

    • ISO-8859-2

    • ISO-8859-13

    • ISO-8859-16

    • Windows-1250

    • IBM852

    • MAC-CENTRALEUROPE

  • 葡萄牙语

    • ISO-8859-1

    • ISO-8859-9

    • ISO-8859-15

    • WINDOWS-1252

  • 罗马尼亚语

    • ISO-8859-2

    • ISO-8859-16

    • Windows-1250

    • IBM852

  • 俄语

    • ISO-8859-5

    • KOI8-R

    • WINDOWS-1251

    • MAC-CYRILLIC

    • IBM866

    • IBM855

  • 斯洛伐克语

    • Windows-1250

    • ISO-8859-2

    • IBM852

    • MAC-CENTRALEUROPE

  • 斯洛文尼亚语

    • ISO-8859-2

    • ISO-8859-16

    • Windows-1250

    • IBM852

    • M

示例

# -*- coding: utf-8 -*-
import cchardet as chardet
with open(r"src/tests/samples/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f:
    msg = f.read()
    result = chardet.detect(msg)
    print(result)

基准

$ cd src/
$ pip install chardet
$ python tests/bench.py

结果

CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz

RAM: DDR4-3200 64GB

平台: Ubuntu 20.04 amd64

Python 3.9.0

请求(调用/)

chardet v3.0.4

0.46

cchardet v2.1.7

1404.05

许可证

COPYING 文件。

联系

平台

支持

  • Windows i686, x86_64

  • Linux i686, x86_64

  • macOS x86_64

不支持

更改

2.x.x

2.1.7 (2020-10-27)

  • 支持 Python 3.9

  • 停止支持 Python 3.5

2.1.6 (2020-03-17)

  • 停止支持 Python 2.7

  • 支持 Github Actions

  • 更新开发依赖项

2.1.5 (2019-09-27)

  • 更新语言模型(uchardet)

  • 添加 iso8859-2 测试但禁用它

  • 支持 Python 3.8

  • 停止支持 Python 3.4

2.1.4 (2018-09-27)

  • 禁用 LTO 因为性能变差

2.1.3 (2018-09-26)

  • 支持 Python 3.7

2.1.2 (2018-09-26)

  • 启用 LTO 以支持 wheel 构建

  • 更新 Cython

2.1.1 (2017-07-01)

  • 修复不同块大小导致的不同结果

  • 修复将 nsSMState 赋值给 nsCodingStateMachine 导致的行为未指定的问题

  • 包含 COPYING 在包中

2.1.0 (2017-05-15)

2.0.1 (2017-04-25)

  • 修复 UTF-8 带有 BOM 不会被检测为 UTF-8-SIG 的问题(修复 #28

  • 将 NULL 字节传递给 feed() / detect()(修复 #27

2.0.0 (2017-04-06)

  • 改进测试

2.0a4 (2017-04-05)

  • 更新 uchardet 仓库(修复缓冲区溢出)

2.0a3 (2017-03-29)

  • 实现 UniversalDetector(类似于 chardet)

2.0a2 (2017-03-28)

  • 更新 uchardet 仓库(修复内存泄漏)

2.0a1 (2017-03-28)

1.1.3 (2017-02-26)

  • 支持 AArch64

1.1.2 (2017-01-08)

  • 支持 Python 3.6

1.1.1 (2016-11-05)

  • 使用 len() 函数(9e61cb9e96b138b0d18e5f9e013e144202ae4067)

  • 从 _cchardet.pyx 中删除 detect 函数(25b581294fc0ae8f686ac9972c8549666766f695)

  • 支持 manylinux1 wheel

1.1.0 (2016-10-17)

  • 添加 Detector 类

  • 改进单元测试

项目详情


下载文件

下载适合您平台的文件。如果您不确定该选择哪个,请了解有关安装包的更多信息。

源分布

faust-cchardet-2.1.19.tar.gz (678.9 kB 查看哈希值)

上传时间

构建分布

faust_cchardet-2.1.19-pp310-pypy310_pp73-win_amd64.whl (116.0 kB 查看哈希值)

上传时间 PyPy Windows x86-64

faust_cchardet-2.1.19-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140.2 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (140.3 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (140.0 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-pp310-pypy310_pp73-macosx_10_9_x86_64.whl (122.4 kB 查看哈希值)

上传时间 PyPy macOS 10.9+ x86-64

faust_cchardet-2.1.19-pp39-pypy39_pp73-win_amd64.whl (115.9 kB 查看哈希值)

上传时间 PyPy Windows x86-64

faust_cchardet-2.1.19-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140.1 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (140.3 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (139.9 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (122.3 kB 查看哈希值)

上传时间 PyPy macOS 10.9+ x86-64

faust_cchardet-2.1.19-pp38-pypy38_pp73-win_amd64.whl (115.1 kB 查看哈希值)

上传时间 PyPy Windows x86-64

faust_cchardet-2.1.19-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (139.3 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (139.6 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (139.1 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (121.9 kB 查看哈希值)

上传时间 PyPy macOS 10.9+ x86-64

faust_cchardet-2.1.19-pp37-pypy37_pp73-win_amd64.whl (115.1 kB 查看哈希值)

上传时间 PyPy Windows x86-64

faust_cchardet-2.1.19-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (139.5 kB 查看哈希值)

上传时间 PyPy manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (139.4 kB 查看哈希值)

上传于 PyPy manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (139.5 kB 查看哈希值)

上传于 PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (121.9 kB 查看哈希值)

上传于 PyPy macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp312-cp312-win_amd64.whl (119.3 kB 查看哈希值)

上传于 CPython 3.12 Windows x86-64

faust_cchardet-2.1.19-cp312-cp312-musllinux_1_1_x86_64.whl (861.7 kB 查看哈希值)

上传于 CPython 3.12 musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp312-cp312-musllinux_1_1_i686.whl (902.1 kB 查看哈希值)

上传于 CPython 3.12 musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp312-cp312-musllinux_1_1_aarch64.whl (852.6 kB 查看哈希值)

上传于 CPython 3.12 musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (317.1 kB 查看哈希值)

上传于 CPython 3.12 manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (319.2 kB 查看哈希值)

上传于 CPython 3.12 manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (305.8 kB 查看哈希值)

上传于 CPython 3.12 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp312-cp312-macosx_11_0_arm64.whl (134.8 kB 查看哈希值)

上传于 CPython 3.12 macOS 11.0+ ARM64

faust_cchardet-2.1.19-cp312-cp312-macosx_10_9_x86_64.whl (135.1 kB 查看哈希值)

上传于 CPython 3.12 macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp311-cp311-win_amd64.whl (119.2 kB 查看哈希值)

上传于 CPython 3.11 Windows x86-64

faust_cchardet-2.1.19-cp311-cp311-musllinux_1_1_x86_64.whl (857.9 kB 查看哈希值)

上传于 CPython 3.11 musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp311-cp311-musllinux_1_1_i686.whl (899.6 kB 查看哈希值)

上传于 CPython 3.11 musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp311-cp311-musllinux_1_1_aarch64.whl (849.3 kB 查看哈希值)

上传于 CPython 3.11 musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.2 kB 查看哈希值)

上传于 CPython 3.11 manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (315.5 kB 查看哈希值)

上传于 CPython 3.11 manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (302.7 kB 查看哈希值)

上传于 CPython 3.11 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp311-cp311-macosx_11_0_arm64.whl (134.6 kB 查看哈希值)

上传于 CPython 3.11 macOS 11.0+ ARM64

faust_cchardet-2.1.19-cp311-cp311-macosx_10_9_x86_64.whl (134.7 kB 查看哈希值)

上传于 CPython 3.11 macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp310-cp310-win_amd64.whl (118.6 kB 查看哈希值)

上传于 CPython 3.10 Windows x86-64

faust_cchardet-2.1.19-cp310-cp310-musllinux_1_1_x86_64.whl (847.9 kB 查看哈希值)

上传于 CPython 3.10 musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp310-cp310-musllinux_1_1_i686.whl (890.7 kB 查看哈希值)

上传于 CPython 3.10 musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp310-cp310-musllinux_1_1_aarch64.whl (839.4 kB 查看哈希值)

上传于 CPython 3.10 musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (302.0 kB 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (304.0 kB 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (292.4 kB 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp310-cp310-macosx_11_0_arm64.whl (134.1 kB 查看哈希值)

上传于 CPython 3.10 macOS 11.0+ ARM64

faust_cchardet-2.1.19-cp310-cp310-macosx_10_9_x86_64.whl (134.0 kB 查看哈希值)

上传于 CPython 3.10 macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp39-cp39-win_amd64.whl (119.7 kB 查看哈希值)

上传时间: CPython 3.9 Windows x86-64

faust_cchardet-2.1.19-cp39-cp39-musllinux_1_1_x86_64.whl (854.0 kB 查看哈希值)

上传时间: CPython 3.9 musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp39-cp39-musllinux_1_1_i686.whl (896.6 kB 查看哈希值)

上传时间: CPython 3.9 musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp39-cp39-musllinux_1_1_aarch64.whl (845.4 kB 查看哈希值)

上传时间: CPython 3.9 musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308.4 kB 查看哈希值)

上传时间: CPython 3.9 manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (310.7 kB 查看哈希值)

上传时间: CPython 3.9 manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (298.3 kB 查看哈希值)

上传时间: CPython 3.9 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp39-cp39-macosx_11_0_arm64.whl (135.4 kB 查看哈希值)

上传时间: CPython 3.9 macOS 11.0+ ARM64

faust_cchardet-2.1.19-cp39-cp39-macosx_10_9_x86_64.whl (135.4 kB 查看哈希值)

上传时间: CPython 3.9 macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp38-cp38-win_amd64.whl (119.8 kB 查看哈希值)

上传时间: CPython 3.8 Windows x86-64

faust_cchardet-2.1.19-cp38-cp38-musllinux_1_1_x86_64.whl (854.2 kB 查看哈希值)

上传时间 CPython 3.8 musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp38-cp38-musllinux_1_1_i686.whl (897.3 kB 查看哈希值)

上传时间 CPython 3.8 musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp38-cp38-musllinux_1_1_aarch64.whl (845.3 kB 查看哈希值)

上传时间 CPython 3.8 musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308.5 kB 查看哈希值)

上传时间 CPython 3.8 manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (310.8 kB 查看哈希值)

上传时间 CPython 3.8 manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (298.5 kB 查看哈希值)

上传时间 CPython 3.8 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (298.5 kB 查看哈希值)

上传时间 CPython 3.8 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp38-cp38-macosx_11_0_arm64.whl (135.2 kB 查看哈希值)

上传时间 CPython 3.8 macOS 11.0+ ARM64

faust_cchardet-2.1.19-cp38-cp38-macosx_10_9_x86_64.whl (135.2 kB 查看哈希值)

上传时间 CPython 3.8 macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp37-cp37m-win_amd64.whl (120.2 kB 查看哈希值)

上传于 CPython 3.7m musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp37-cp37m-musllinux_1_1_i686.whl (891.6 kB 查看哈希值)

上传于 CPython 3.7m musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp37-cp37m-musllinux_1_1_aarch64.whl (839.7 kB 查看哈希值)

上传于 CPython 3.7m musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (304.2 kB 查看哈希值)

上传于 CPython 3.7m manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (306.9 kB 查看哈希值)

上传于 CPython 3.7m manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (293.9 kB 查看哈希值)

上传于 CPython 3.7m manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp37-cp37m-macosx_10_9_x86_64.whl (135.7 kB 查看哈希值)

上传于 CPython 3.7m macOS 10.9+ x86-64

faust_cchardet-2.1.19-cp36-cp36m-win_amd64.whl (124.9 kB 查看哈希值)

上传于 CPython 3.6m Windows x86-64

faust_cchardet-2.1.19-cp36-cp36m-musllinux_1_1_x86_64.whl (837.4 kB 查看哈希值)

上传于 CPython 3.6m musllinux: musl 1.1+ x86-64

faust_cchardet-2.1.19-cp36-cp36m-musllinux_1_1_i686.whl (879.8 kB 查看哈希值)

上传于 CPython 3.6m musllinux: musl 1.1+ i686

faust_cchardet-2.1.19-cp36-cp36m-musllinux_1_1_aarch64.whl (828.4 kB 查看哈希值)

上传于 CPython 3.6m musllinux: musl 1.1+ ARM64

faust_cchardet-2.1.19-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (293.2 kB 查看哈希值)

上传于 CPython 3.6m manylinux: glibc 2.17+ x86-64

faust_cchardet-2.1.19-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (295.0 kB 查看哈希值)

上传于 CPython 3.6m manylinux: glibc 2.17+ ARM64

faust_cchardet-2.1.19-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (283.1 kB 查看哈希值)

上传于 CPython 3.6m manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

faust_cchardet-2.1.19-cp36-cp36m-macosx_10_9_x86_64.whl (133.8 kB 查看哈希值)

上传于 CPython 3.6m macOS 10.9+ x86-64

支持