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.tar.gz (19.0 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-py3-none-any.whl (627.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for chardet-6.0.0.tar.gz
Algorithm Hash digest
SHA256 aaa00ede13dd39a582de2b1254221a1f3e1c77e7738036431b6cb7e6a05b4f19
MD5 6e637cd6667ea6924e2b32423493ce89
BLAKE2b-256 b8f33005cbe63db313a572c6094611da51be38e1354a4b039d089ad22820e5ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chardet-6.0.0-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.14.3

File hashes

Hashes for chardet-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 502eee44c943b21e178cb537980b1331b42abf99505085e8ae881e27245083bb
MD5 644262109dcd0325409235d40e746181
BLAKE2b-256 db4de80f926abb83cff88710b275667173fe8407a093bc42369739c37535cb90

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