◐ Shell
clean mode source ↗

gh-88886: Remove excessive encoding name normalization by serhiy-storchaka · Pull Request #137167 · python/cpython

StanFromIreland

The codecs lookup function now performs only minimal normalization of
the encoding name before passing it to the search functions:
all ASCII letters are converted to lower case, spaces are replaced
with hyphens.

Excessive normalization broke third-party codecs providers, like
python-iconv.

Revert "bpo-37751: Fix codecs.lookup() normalization (pythonGH-15092)"

This reverts commit 20f59fe.

malemburg

StanFromIreland

@serhiy-storchaka

vstinner

Co-authored-by: Victor Stinner <vstinner@python.org>

lkollar pushed a commit to lkollar/cpython that referenced this pull request

Sep 9, 2025
…H-137167)

The codecs lookup function now performs only minimal normalization of
the encoding name before passing it to the search functions:
all ASCII letters are converted to lower case, spaces are replaced
with hyphens.

Excessive normalization broke third-party codecs providers, like
python-iconv.

Revert "bpo-37751: Fix codecs.lookup() normalization (pythonGH-15092)"

This reverts commit 20f59fe.