webencodings is a Python implementation of the WHATWG Encoding standard.
In order to be compatible with legacy web content when interpreting something like Content-Type: text/html; charset=latin1, tools need to use a particular set of aliases for encoding labels as well as some overriding rules. For example, US-ASCII and iso-8859-1 on the web are actually aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes precedence over any other encoding declaration. The Encoding standard defines all such details so that implementations do not have to reverse-engineer each other.
This module has encoding labels and BOM detection, but the actual implementation for encoders and decoders is Python’s.
Free software: BSD license
For Python 3.10+, tested on CPython and PyPy
Documentation: https://doc.courtbouillon.org/webencodings
Changelog: https://github.com/CourtBouillon/webencodings/releases
Code, issues, tests: https://github.com/CourtBouillon/webencodings
Code of conduct: https://www.courtbouillon.org/code-of-conduct
Professional support: https://www.courtbouillon.org
Donation: https://opencollective.com/courtbouillon
This module is a friendly fork of webencodings, written and maintained by Simon Sapin and Sam Sneddon.
Copyrights are retained by their contributors, no copyright assignment is required to contribute to webencodings. Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion is licensed under the BSD 3-clause license, without any additional terms or conditions. For full authorship information, see the version control history.
Release files for webencodings 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| webencodings-0.6.1.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| webencodings-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Release files / webencodings-0.6.1.tar.gz
| Download URL | webencodings-0.6.1.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
565f9ad031c702dae404e27a099e3e09186a3ab1b9520f06d215502b651fd910
|
|
BLAKE2b-256 checksum How to use checksums |
d5a08fd707bcb776a7be556bad06a2ea5fb9bd519df78ef8e26f70ccf0f38bff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / webencodings-0.6.1-py3-none-any.whl
| Download URL | webencodings-0.6.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fab6269c8bf237c657876b52058ccb182e861518d1c695c1a9aaa8c1c105d5b
|
|
BLAKE2b-256 checksum How to use checksums |
77c6040cbc72480d789a5f40d63fb484d3106554c4dfa2d2b70ad5022057750f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency log