Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > How about PyUnicode_GetUTF8Buffer() or just PyUnicode_UTF8() ?!
-1 > Note that the function *must* check the UTF-8 buffer for embedded > NUL bytes and then raise an exception if it finds one. Otherwise, > the API would silently cause truncations. PyString_AsString doesn't check for null bytes, either, and will also silently truncate. This has never been a problem, so I fail to see why it is a problem for Unicode strings. ---------- title: Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() -> Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2799> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com