Skip to main content

Universal encoding detector for Python 3

Project description

Chardet: The Universal Character Encoding Detector

Build status Latest version on PyPI License

Detects over 70 character encodings including:

  • All major Unicode encodings (UTF-8, UTF-16, UTF-32)

  • Windows code pages (Windows-1250 through Windows-1258)

  • ISO-8859 family (ISO-8859-1 through ISO-8859-16)

  • CJK encodings (Big5, GB18030, EUC-JP, EUC-KR, Shift-JIS, and more)

  • Cyrillic encodings (KOI8-R, KOI8-U, IBM866, and more)

  • Mac encodings (MacRoman, MacCyrillic, and more)

  • DOS/OEM code pages (CP437, CP850, CP866, and more)

  • EBCDIC variants (CP037, CP500)

See the full list of supported encodings.

Requires Python 3.10+.

Installation

Install from PyPI:

pip install chardet

Documentation

For users, docs are now available at https://chardet.readthedocs.io/.

Command-line Tool

chardet comes with a command-line script which reports on the encodings of one or more files:

% chardetect somefile someotherfile
somefile: windows-1252 with confidence 0.5
someotherfile: ascii with confidence 1.0

About

This is a continuation of Mark Pilgrim’s excellent original chardet port from C, and Ian Cordasco’s charade Python 3-compatible fork.

maintainer:

Dan Blanchard

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

chardet-6.0.0.post1.tar.gz (12.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chardet-6.0.0.post1-py3-none-any.whl (627.2 kB view details)

Uploaded Python 3

File details

Details for the file chardet-6.0.0.post1.tar.gz.

File metadata

  • Download URL: chardet-6.0.0.post1.tar.gz
  • Upload date:
  • Size: 12.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for chardet-6.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 6b78048c3c97c7b2ed1fbad7a18f76f5a6547f7d34dbab536cc13887c9a92fa4
MD5 5ee89346ff4cc6780dda2d0b42e8aea5
BLAKE2b-256 7f42fb9436c103a881a377e34b9f58d77b5f503461c702ff654ebe86151bcfe9

See more details on using hashes here.

File details

Details for the file chardet-6.0.0.post1-py3-none-any.whl.

File metadata

  • Download URL: chardet-6.0.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 627.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for chardet-6.0.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 c894a36800549adf7bb5f2af47033281b75fdfcd2aa0f0243be0ad22a52e2dcb
MD5 4535a171ed1fe115e74c1ea1749cf2c7
BLAKE2b-256 66425de54f632c2de53cd3415b3703383d5fff43a94cbc0567ef362515261a21

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