Skip to content

Commit 9c93da5

Browse files
Update Doc/library/codecs.rst
Co-authored-by: Stan Ulbrych <[email protected]>
1 parent bc661bc commit 9c93da5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/codecs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,8 @@ then bytes have to be swapped though. To be able to detect the endianness of a
10021002
This is the Unicode character ``U+FEFF``. This character can be prepended to every
10031003
``UTF-16`` or ``UTF-32`` byte sequence. The byte swapped version of this character
10041004
(``0xFFFE``) is an illegal character that may not appear in a Unicode text.
1005-
So when the first character in a ``UTF-16`` or ``UTF-32`` byte sequence appears to be
1006-
a ``U+FFFE`` the bytes have to be swapped on decoding.
1005+
When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is
1006+
``U+FFFE``, the bytes have to be swapped on decoding.
10071007

10081008
Unfortunately the character ``U+FEFF`` had a second purpose as
10091009
a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow

0 commit comments

Comments
 (0)