]> granicus.if.org Git - python/commitdiff
Backport checkin:
authorWalter Dörwald <walter@livinglogic.de>
Thu, 3 May 2007 15:16:16 +0000 (15:16 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Thu, 3 May 2007 15:16:16 +0000 (15:16 +0000)
Clarify the behaviour of PyUnicode_DecodeUTF16(): A BOM is only skipped
in native order mode, and only if it's the first two bytes.

Doc/api/concrete.tex

index e1f3e9a1f910448b8aebebacaffc5683e6321125..8aa9b0f46117c83925533056d9e9de03af3e131d 100644 (file)
@@ -1173,10 +1173,10 @@ These are the UTF-16 codec APIs:
    *byteorder == 1:  big endian
 \end{verbatim}
 
-  and then switches according to all byte order marks (BOM) it finds
-  in the input data.  BOMs are not copied into the resulting Unicode
-  string.  After completion, \var{*byteorder} is set to the current
-  byte order at the end of input data.
+  and then switches if the first two bytes of the input data are a byte order
+  mark (BOM) and the specified byte order is native order.  This BOM is not
+  copied into the resulting Unicode string.  After completion, \var{*byteorder}
+  is set to the current byte order at the.
 
   If \var{byteorder} is \NULL{}, the codec starts in native order mode.