This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benjamin.peterson, docs@python, martin.panter, r.david.murray, vstinner, zbysz
Date 2014-12-18.08:13:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> Is it safe to assume PyUnicode_AsUTF8() is null-terminated?

Yes, Python ensures that the string is null terminated.

> (like PyBytes_AS_STRING() is)

Yes, PyBytes_AS_STRING() also ends with a null byte.

By the way, Unicode strings internally ends with a null character.
Date User Action Args
2014-12-18 08:13:13vstinnersetrecipients: + vstinner, benjamin.peterson, r.david.murray, zbysz, docs@python, martin.panter
2014-12-18 08:13:13vstinnerlinkissue21071 messages
2014-12-18 08:13:13vstinnercreate