Stefan Behnel <[EMAIL PROTECTED]> added the comment: While PyUnicode_AsStringAndSize() may be a better solution if the length is required, PyUnicode_AsString is enough() when it is not required. So I don't buy that argument. Since there are dedicated UTF-8 encoding functions, both functions are pure convenience anyway.
Embedded \0 bytes can bite you, but that's completely unrelated to the issue discussed here. I wouldn't oppose renaming the function, but I don't see why it should go. ---------- nosy: +scoder _______________________________________ 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