diff options
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r-- | Doc/c-api/unicode.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 5ab9f1c..d17e63d 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -992,11 +992,19 @@ These are the UTF-8 codec APIs: As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size. + Raise an exception if the *unicode* string contains embedded null + characters. To accept embedded null characters and truncate on purpose + at the first null byte, ``PyUnicode_AsUTF8AndSize(unicode, NULL)`` can be + used instead. + .. versionadded:: 3.3 .. versionchanged:: 3.7 The return type is now ``const char *`` rather of ``char *``. + .. versionchanged:: 3.13 + Raise an exception if the string contains embedded null characters. + UTF-32 Codecs """"""""""""" |