diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-08-05 20:26:11 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-08-05 20:26:11 (GMT) |
commit | 9c121069d3a61868f4586ad2ba2e5435a82af061 (patch) | |
tree | 2b855fe92ed298ec849c14a4f01a9c0402a6fff7 /Doc/api | |
parent | 64ce5052e1c2495bcbc78f732e8ece2f4c8375ac (diff) | |
download | cpython-9c121069d3a61868f4586ad2ba2e5435a82af061.zip cpython-9c121069d3a61868f4586ad2ba2e5435a82af061.tar.gz cpython-9c121069d3a61868f4586ad2ba2e5435a82af061.tar.bz2 |
Change PyUnicode_FromString[AndSize] to expect UTF-8.
Diffstat (limited to 'Doc/api')
-rw-r--r-- | Doc/api/concrete.tex | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index afba52f..4dc3f4c 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -996,10 +996,11 @@ use these APIs: \var{u} is \NULL{}. \end{cfuncdesc} -\begin{cfuncdesc}{PyObject*}{PyUnicode_FromString}{const char *u} +\begin{cfuncdesc}{PyObject*}{PyUnicode_FromStringAndSize}{const char *u, + Py_ssize_t size} Create a Unicode Object from the char buffer \var{u}. - \var{u} must be 0-terminated, the bytes will be interpreted as - being latin-1 encoded. \var{u} may also be \NULL{} which causes the + The bytes will be interpreted as being UTF-8 encoded. + \var{u} may also be \NULL{} which causes the contents to be undefined. It is the user's responsibility to fill in the needed data. The buffer is copied into the new object. If the buffer is not \NULL{}, the return value might be a shared object. @@ -1008,6 +1009,12 @@ use these APIs: \versionadded{3.0} \end{cfuncdesc} +\begin{cfuncdesc}{PyObject*}{PyUnicode_FromString}{const char*u} + Create a Unicode object from an UTF-8 encoded null-terminated + char buffer \var{u}. + \versionadded{3.0} +\end{funcdesc} + \begin{cfuncdesc}{PyObject*}{PyUnicode_FromFormat}{const char *format, ...} Take a C \cfunction{printf()}-style \var{format} string and a variable number of arguments, calculate the size of the resulting |