mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
Issue #11303: Added shortcuts for utf8 and latin1 encodings.
Documented the list of optimized encodings as CPython implementation detail.
This commit is contained in:
parent
eea22d2d66
commit
1d52146a25
2 changed files with 19 additions and 4 deletions
|
|
@ -904,6 +904,15 @@ is meant to be exhaustive. Notice that spelling alternatives that only differ in
|
|||
case or use a hyphen instead of an underscore are also valid aliases; therefore,
|
||||
e.g. ``'utf-8'`` is a valid alias for the ``'utf_8'`` codec.
|
||||
|
||||
.. impl-detail::
|
||||
|
||||
Some common encodings can bypass the codecs lookup machinery to
|
||||
improve performance. These optimization opportunities are only
|
||||
recognized by CPython for a limited set of aliases: utf-8, utf8,
|
||||
latin-1, latin1, iso-8859-1, mbcs (Windows only), ascii, utf-16,
|
||||
and utf-32. Using alternative spellings for these encodings may
|
||||
result in slower execution.
|
||||
|
||||
Many of the character sets support the same languages. They vary in individual
|
||||
characters (e.g. whether the EURO SIGN is supported or not), and in the
|
||||
assignment of characters to code positions. For the European languages in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue