This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add utf-8 alias to aliases.py dictionary
Type: behavior Stage:
Components: email Versions: Python 3.7, Python 3.6, Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Christian Sarazin, barry, r.david.murray, vstinner
Priority: normal Keywords:

Created on 2016-09-12 14:19 by Christian Sarazin, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg276052 - (view) Author: Christian Sarazin (Christian Sarazin) Date: 2016-09-12 14:19
The utf-8 alias should be added to the utf_8 codec block inside aliases.py


Thx

Cheers
Christian
msg276053 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-12 14:25
> The utf-8 alias should be added to the utf_8 codec block inside aliases.py

Codec names are normalized by encodings.normalize_encoding():

>>> encodings.normalize_encoding(' Utf-8 ')
'Utf_8'

And then converted to lower case, so there is no need to all syntaxes of "utf-8", it already works ;-)

>>> codecs.lookup(' Utf-8 ').name
'utf-8'
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72288
2016-09-12 14:25:15vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg276053

resolution: not a bug
2016-09-12 14:19:42Christian Sarazincreate