File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -991,9 +991,9 @@ possibilities: store the bytes in big endian or in little endian order. These
991991two encodings are called ``UTF-32-BE `` and ``UTF-32-LE `` respectively. Their
992992disadvantage is that if, for example, you use ``UTF-32-BE `` on a little endian
993993machine 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
997997practice, so native-endian data round-trips without redundant byte swapping,
998998even though the Unicode Standard defaults to big-endian when the byte order is
999999unspecified. When these bytes are read by a CPU with a different endianness,
You can’t perform that action at this time.
0 commit comments