[Python-Dev] Py_UNICODE madness
nbastin at opnet.com
Wed May 4 16:14:31 CEST 2005
On May 4, 2005, at 4:39 AM, M.-A. Lemburg wrote:
>> At the very least, if we can't guarantee the internal representation,
>> then the PyUnicode_FromUnicode API needs to go away, and be replaced
>> with something capable of transcoding various unicode inputs into the
>> internal python representation.
> We have PyUnicode_Decode() for that. PyUnicode_FromUnicode is
> useful and meant for working directly on Py_UNICODE buffers.
Is this API documented anywhere? (It's not in the Unicode Object
section of the API doc). Also, this is quite inefficient if the source
data is in UTF-16, because it appears that I'll have to transcode my
data to utf-8 before I can pass it to this function, but I guess I'll
have to live with that.
More information about the Python-Dev