]> granicus.if.org Git - python/commitdiff
Drop claims that Unicode always means UCS-2. Fixes #881861.
authorMartin v. Löwis <martin@v.loewis.de>
Thu, 3 Jun 2004 09:55:28 +0000 (09:55 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Thu, 3 Jun 2004 09:55:28 +0000 (09:55 +0000)
Doc/api/concrete.tex
Doc/api/utilities.tex

index 2c4d45f82f166caec67f0853be34bc64ec78c450..c9ca1e7eeceacdbf6e51618ddf942e50fac69be7 100644 (file)
@@ -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
   is prepended.
 
-  Note that \ctype{Py_UNICODE} data is being interpreted as UTF-16
-  reduced to UCS-2. This trick makes it possible to add full UTF-16
-  capabilities at a later point without comprimising the APIs.
+  If \var{Py_UNICODE_WIDE} is defined, a single \ctype{Py_UNICODE}
+  value may get represented as a surrogate pair. If it is not
+  defined, each \ctype{Py_UNICODE} values is interpreted as an
+  UCS-2 character.
 
   Returns \NULL{} if an exception was raised by the codec.
 \end{cfuncdesc}
index 39ca93277c3ff8fa163f8a1811863ed5414a7410..f4fa899ec074866971aebc916665bdfc7508a2b0 100644 (file)
@@ -780,14 +780,14 @@ PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
     Same as \samp{s\#}.
 
     \item[\samp{u} (Unicode string) {[Py_UNICODE *]}]
-    Convert a null-terminated buffer of Unicode (UCS-2) data to a
-    Python Unicode object.  If the Unicode buffer pointer is \NULL,
-    \code{None} is returned.
+    Convert a null-terminated buffer of Unicode (UCS-2 or UCS-4) 
+    data to a Python Unicode object.  If the Unicode buffer pointer 
+    is \NULL, \code{None} is returned.
 
     \item[\samp{u\#} (Unicode string) {[Py_UNICODE *, int]}]
-    Convert a Unicode (UCS-2) data buffer and its length to a Python
-    Unicode object.   If the Unicode buffer pointer is \NULL, the
-    length is ignored and \code{None} is returned.
+    Convert a Unicode (UCS-2 or UCS-4) data buffer and its length 
+    to a Python Unicode object.   If the Unicode buffer pointer 
+    is \NULL, the length is ignored and \code{None} is returned.
 
     \item[\samp{i} (integer) {[int]}]
     Convert a plain C \ctype{int} to a Python integer object.