◐ Shell
clean mode source ↗

bpo-37751: Fix normalizestring() with hyphens and spaces converted to underscores by fusioncid · Pull Request #15092 · python/cpython

@fusioncid

shihai1991

@fusioncid fusioncid changed the title bpo-37751: Fix normalizestring() with hyphens and spaces converted to… bpo-37751: Fix normalizestring() with hyphens and spaces converted to underscores

Aug 17, 2019

vstinner

I think use a regular exception is better. Thanks.

Co-Authored-By: Victor Stinner <vstinner@redhat.com>

@blurb-it

vstinner

@fusioncid

vstinner

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

Sep 10, 2019
Fix codecs.lookup() to normalize the encoding name the same way
than encodings.normalize_encoding(), except that codecs.lookup()
also converts the name to lower case.

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

Jan 14, 2020
Fix codecs.lookup() to normalize the encoding name the same way
than encodings.normalize_encoding(), except that codecs.lookup()
also converts the name to lower case.

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

Jul 20, 2020
Fix codecs.lookup() to normalize the encoding name the same way
than encodings.normalize_encoding(), except that codecs.lookup()
also converts the name to lower case.

eight04 added a commit to eight04/pyUAO that referenced this pull request

Feb 22, 2021
* Fix running with Python 3.9

Since Python 3.9 [1], codecs names are normalized in a different way.

[1] python/cpython#15092

* Add: github action, bump dependencies

Co-authored-by: eight04 <eight04@gmail.com>

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request

Jul 28, 2025
The codecs lookup function now performs only minimal normalization of
the encoding name before passing it to the serach 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.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request

Jul 28, 2025
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.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request

Jul 28, 2025
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.

serhiy-storchaka added a commit that referenced this pull request

Sep 9, 2025
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 (GH-15092)"

This reverts commit 20f59fe.

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.