# HG changeset patch # Parent 3de678cd184d943f53e9bc0e74feefaa07cc7f55 Document that the UTF-8 representation is null-terminated diff -r 3de678cd184d Doc/c-api/unicode.rst --- a/Doc/c-api/unicode.rst Thu Dec 18 23:47:55 2014 +0100 +++ b/Doc/c-api/unicode.rst Fri Dec 19 04:39:27 2014 +0000 @@ -1045,7 +1045,8 @@ .. c:function:: char* PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *size) - Return a pointer to the default encoding (UTF-8) of the Unicode object, and + Return a pointer to the NUL-terminated UTF-8 encoding of + the Unicode object, and store the size of the encoded representation (in bytes) in *size*. *size* can be *NULL*, in this case no size will be stored.