diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-02-25 19:19:57 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2011-02-25 19:19:57 (GMT) |
commit | 1d52146a25fdf534117602e77c7f3f539ea64294 (patch) | |
tree | 5adfb510b3345e0321770055f224e54ddb33d090 /Doc | |
parent | eea22d2d660eae039ab392684ac8a8693f1f2a4d (diff) | |
download | cpython-1d52146a25fdf534117602e77c7f3f539ea64294.zip cpython-1d52146a25fdf534117602e77c7f3f539ea64294.tar.gz cpython-1d52146a25fdf534117602e77c7f3f539ea64294.tar.bz2 |
Issue #11303: Added shortcuts for utf8 and latin1 encodings.
Documented the list of optimized encodings as CPython implementation
detail.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/codecs.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index c9222ca..0bffdb3 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -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 |