[Python-Dev] getting the UCS-2 representation of a unicode object

Andreas Jung andreas@andreas-jung.com
Sun, 19 May 2002 08:52:27 -0400


Py_BuildValue() allows the usage of "u" or "u#" to convert UCS-2
data into a Python unicode object, however Py_ParseTuple() converts
a unicode object to UTF-16. Is this an error in the documentation
or why is there a asymmmetry in the API?

Andreas

    ---------------------------------------------------------------------
   -    Andreas Jung                            Zope Corporation       -
  -   EMail: andreas@zope.com                http://www.zope.com      -
 -  "Python Powered"                       http://www.python.org     - 
  -   "Makers of Zope"                       http://www.zope.org      - 
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------