mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Drop claims that Unicode always means UCS-2. Fixes #881861.
This commit is contained in:
parent
4a9b8069e0
commit
9bc4f2def3
2 changed files with 10 additions and 9 deletions
|
@ -1109,9 +1109,10 @@ These are the UTF-16 codec APIs:
|
||||||
the Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark
|
the Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark
|
||||||
is prepended.
|
is prepended.
|
||||||
|
|
||||||
Note that \ctype{Py_UNICODE} data is being interpreted as UTF-16
|
If \var{Py_UNICODE_WIDE} is defined, a single \ctype{Py_UNICODE}
|
||||||
reduced to UCS-2. This trick makes it possible to add full UTF-16
|
value may get represented as a surrogate pair. If it is not
|
||||||
capabilities at a later point without comprimising the APIs.
|
defined, each \ctype{Py_UNICODE} values is interpreted as an
|
||||||
|
UCS-2 character.
|
||||||
|
|
||||||
Returns \NULL{} if an exception was raised by the codec.
|
Returns \NULL{} if an exception was raised by the codec.
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
|
@ -780,14 +780,14 @@ PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
|
||||||
Same as \samp{s\#}.
|
Same as \samp{s\#}.
|
||||||
|
|
||||||
\item[\samp{u} (Unicode string) {[Py_UNICODE *]}]
|
\item[\samp{u} (Unicode string) {[Py_UNICODE *]}]
|
||||||
Convert a null-terminated buffer of Unicode (UCS-2) data to a
|
Convert a null-terminated buffer of Unicode (UCS-2 or UCS-4)
|
||||||
Python Unicode object. If the Unicode buffer pointer is \NULL,
|
data to a Python Unicode object. If the Unicode buffer pointer
|
||||||
\code{None} is returned.
|
is \NULL, \code{None} is returned.
|
||||||
|
|
||||||
\item[\samp{u\#} (Unicode string) {[Py_UNICODE *, int]}]
|
\item[\samp{u\#} (Unicode string) {[Py_UNICODE *, int]}]
|
||||||
Convert a Unicode (UCS-2) data buffer and its length to a Python
|
Convert a Unicode (UCS-2 or UCS-4) data buffer and its length
|
||||||
Unicode object. If the Unicode buffer pointer is \NULL, the
|
to a Python Unicode object. If the Unicode buffer pointer
|
||||||
length is ignored and \code{None} is returned.
|
is \NULL, the length is ignored and \code{None} is returned.
|
||||||
|
|
||||||
\item[\samp{i} (integer) {[int]}]
|
\item[\samp{i} (integer) {[int]}]
|
||||||
Convert a plain C \ctype{int} to a Python integer object.
|
Convert a plain C \ctype{int} to a Python integer object.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue