Skip to main content

Universal encoding detector for Python 3

Project description

Chardet: The Universal Character Encoding Detector

Build status https://img.shields.io/coveralls/chardet/chardet/stable.svg Latest version on PyPI License
Detects
  • ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants)

  • Big5, GB2312, EUC-TW, HZ-GB-2312, ISO-2022-CN (Traditional and Simplified Chinese)

  • EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP (Japanese)

  • EUC-KR, ISO-2022-KR, Johab (Korean)

  • KOI8-R, MacCyrillic, IBM855, IBM866, ISO-8859-5, windows-1251 (Cyrillic)

  • ISO-8859-5, windows-1251 (Bulgarian)

  • ISO-8859-1, windows-1252, MacRoman (Western European languages)

  • ISO-8859-7, windows-1253 (Greek)

  • ISO-8859-8, windows-1255 (Visual and Logical Hebrew)

  • TIS-620 (Thai)

Requires Python 3.7+.

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-5.1.0.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

chardet-5.1.0-py3-none-any.whl (199.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chardet-5.1.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for chardet-5.1.0.tar.gz
Algorithm Hash digest
SHA256 0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5
MD5 394bd03d7a258d2771040bfbd5a7bf66
BLAKE2b-256 4132cdc91dcf83849c7385bf8e2a5693d87376536ed000807fa07f5eab33430d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chardet-5.1.0-py3-none-any.whl
  • Upload date:
  • Size: 199.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for chardet-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9
MD5 c826d3c4cdf1e6dd4baf5b00a3aa3d2e
BLAKE2b-256 748f8fc49109009e8d2169d94d72e6b1f4cd45c13d147ba7d6170fb41f22b08f

See more details on using hashes here.

Supported by

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