Skip to content

Commit a93d9aa

Browse files
gh-42237: Link to complete list of codec aliases (#136625)
Closes #42237
1 parent e18829a commit a93d9aa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Doc/library/codecs.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,8 +1065,15 @@ or with dictionaries as mapping tables. The following table lists the codecs by
10651065
name, together with a few common aliases, and the languages for which the
10661066
encoding is likely used. Neither the list of aliases nor the list of languages
10671067
is meant to be exhaustive. Notice that spelling alternatives that only differ in
1068-
case or use a hyphen instead of an underscore are also valid aliases; therefore,
1069-
e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.
1068+
case or use a hyphen instead of an underscore are also valid aliases
1069+
because they are equivalent when normalized by
1070+
:func:`~encodings.normalize_encoding`. For example, ``'utf-8'`` is a valid
1071+
alias for the ``'utf_8'`` codec.
1072+
1073+
.. note::
1074+
1075+
The below table lists the most common aliases, for a complete list
1076+
refer to the source :source:`aliases.py <Lib/encodings/aliases.py>` file.
10701077

10711078
On Windows, ``cpXXX`` codecs are available for all code pages.
10721079
But only codecs listed in the following table are guarantead to exist on

0 commit comments

Comments
 (0)