Skip to content

Commit 30f8492

Browse files
gh-83336: Add alias for consistency to utf-8-sig (#136530)
Closes #83336
1 parent c4f21d7 commit 30f8492

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Doc/library/codecs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ particular, the following variants typically exist:
13391339
+-----------------+--------------------------------+--------------------------------+
13401340
| utf_8 | U8, UTF, utf8, cp65001 | all languages |
13411341
+-----------------+--------------------------------+--------------------------------+
1342-
| utf_8_sig | | all languages |
1342+
| utf_8_sig | utf8-sig | all languages |
13431343
+-----------------+--------------------------------+--------------------------------+
13441344

13451345
.. versionchanged:: 3.4

Lib/encodings/aliases.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"""
1818
aliases = {
1919

20-
# Please keep this list sorted alphabetically by value !
20+
# Please keep this list sorted alphabetically by value!
2121

2222
# ascii codec
2323
'646' : 'ascii',
@@ -554,6 +554,9 @@
554554
'utf8_ucs4' : 'utf_8',
555555
'cp65001' : 'utf_8',
556556

557+
# utf_8_sig codec
558+
'utf8_sig' : 'utf_8_sig',
559+
557560
# uu_codec codec
558561
'uu' : 'uu_codec',
559562

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`

0 commit comments

Comments
 (0)