Skip to content

Commit 8fda436

Browse files
Update Doc/library/codecs.rst - deduplication
Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 8cda849 commit 8fda436

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/codecs.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,9 @@ possibilities: store the bytes in big endian or in little endian order. These
991991
two encodings are called ``UTF-32-BE`` and ``UTF-32-LE`` respectively. Their
992992
disadvantage is that if, for example, you use ``UTF-32-BE`` on a little endian
993993
machine you will always have to swap bytes on encoding and decoding.
994-
Python's ``UTF-32`` codec avoids this problem by using the platform's native byte
995-
order when no BOM is present. The plain ``UTF-16`` codec (without a ``-BE`` or
996-
``-LE`` suffix) behaves the same way. Python follows prevailing platform
994+
Python's ``UTF-16`` and ``UTF-32`` codecs avoid this problem by using the
995+
platform's native byte order when no BOM is present.
996+
Python follows prevailing platform
997997
practice, so native-endian data round-trips without redundant byte swapping,
998998
even though the Unicode Standard defaults to big-endian when the byte order is
999999
unspecified. When these bytes are read by a CPU with a different endianness,

0 commit comments

Comments
 (0)