Backport checkin:
Clarify the behaviour of PyUnicode_DecodeUTF16(): A BOM is only skipped in native order mode, and only if it's the first two bytes.
This commit is contained in:
parent
412b20bd31
commit
f8f68fbe0e
|
@ -1173,10 +1173,10 @@ These are the UTF-16 codec APIs:
|
||||||
*byteorder == 1: big endian
|
*byteorder == 1: big endian
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
and then switches according to all byte order marks (BOM) it finds
|
and then switches if the first two bytes of the input data are a byte order
|
||||||
in the input data. BOMs are not copied into the resulting Unicode
|
mark (BOM) and the specified byte order is native order. This BOM is not
|
||||||
string. After completion, \var{*byteorder} is set to the current
|
copied into the resulting Unicode string. After completion, \var{*byteorder}
|
||||||
byte order at the end of input data.
|
is set to the current byte order at the.
|
||||||
|
|
||||||
If \var{byteorder} is \NULL{}, the codec starts in native order mode.
|
If \var{byteorder} is \NULL{}, the codec starts in native order mode.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue