skillfed

webencodings

Character encoding aliases for legacy web content

webencodings Permissive license BSD Abandoned 39 v0.5.1 released

Install

webencodings on PyPI

pip

pip install webencodings

uv

uv add webencodings

poetry

poetry add webencodings

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 3,417 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: webencodings-0.5.1-py2.py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP

About webencodings

from the package's own PyPI description — quoted content, verbatim

python-webencodings

This is a Python implementation of the WHATWG Encoding standard <http://encoding.spec.whatwg.org/>_.

  • Latest documentation: http://packages.python.org/webencodings/
  • Source code and issue tracker: https://github.com/gsnedders/python-webencodings
  • PyPI releases: http://pypi.python.org/pypi/webencodings
  • License: BSD
  • Python 2.6+ and 3.3+

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.

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Implements the WHATWG Encoding standard for Python, providing encoding label aliases and BOM detection to correctly interpret character encodings in legacy web content according to web specifications.

Installation is frictionless with no runtime dependencies. However, the package is abandoned—the last release was in 2017 and the last commit in May 2022, with no active maintenance signal.

Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions, making it suitable for incorporation into other projects.

Usage

pip install webencodings==0.5.1

import webencodings
encoding = webencodings.lookup('latin1')
print(encoding)

Verdict: webencodings is a lightweight, dependency-free implementation of the WHATWG Encoding standard with permissive BSD licensing and no known vulnerabilities. However, it is abandoned—no updates since 2017—so it should only be used if you need legacy web encoding compatibility and are comfortable maintaining it yourself or accepting that it will not receive security or compatibility updates.

Needs verification

  • Whether the encoding label and BOM detection behavior remains correct for current web standards despite the lack of recent updates
  • Whether Python 2.6–3.6 support claims are still relevant given modern Python version lifecycles
WHATWG encoding standardcharacter encoding aliasesweb content encoding detectionlegacy charset handlingencoding label resolutionBOM detection pythonweb encoding compatibility

Similar packages