chardet
6.0.0dev0
  • Usage
  • Supported encodings
  • Frequently asked questions
  • How it works
  • API Reference
chardet
  • chardet
  • View page source

chardet

Character encoding auto-detection in Python. As smart as your browser. Open source.

Documentation

  • Usage
    • Basic usage
    • Example: Using the detect function
    • Controlling how much data to process
    • Filtering by encoding era
    • Getting all candidates with detect_all
    • Advanced usage: incremental detection
    • Example: Detecting encodings of multiple files
    • Command-line tool
  • Supported encodings
    • MODERN_WEB
    • LEGACY_ISO
    • LEGACY_MAC
    • LEGACY_REGIONAL
    • DOS
    • MAINFRAME
  • Frequently asked questions
    • What is character encoding?
    • What is character encoding auto-detection?
    • Isn’t that impossible?
    • Who wrote this detection algorithm?
    • Yippie! Screw the standards, I’ll just auto-detect everything!
    • Why bother with auto-detection if it’s slow, inaccurate, and non-standard?
  • How it works
    • Overview
    • BOM detection
    • UTF-16/32 without BOM
    • Escaped encodings
    • Multi-byte encodings
    • Single-byte encodings
    • Encoding era filtering and tie-breaking
  • API Reference
    • chardet package

Indices and tables

  • Index

  • Module Index

  • Search Page

Next

© Copyright 2006-2026, chardet contributors.

Built with Sphinx using a theme provided by Read the Docs.