summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/unicode.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r--Doc/c-api/unicode.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 6e163d6..4222a05 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -396,6 +396,7 @@ used, passsing :func:PyUnicode_FSConverter as the conversion function:
Use :func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length.
+
.. cfunction:: PyObject* PyUnicode_DecodeFSDefault(const char *s)
Decode a string using :cdata:`Py_FileSystemDefaultEncoding` and
@@ -404,6 +405,16 @@ used, passsing :func:PyUnicode_FSConverter as the conversion function:
If :cdata:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
+.. cfunction:: PyObject* PyUnicode_EncodeFSDefault(PyObject *unicode)
+
+ Encode a Unicode object to :cdata:`Py_FileSystemDefaultEncoding` with the
+ ``'surrogateescape'`` error handler, return a :func:`bytes` object.
+
+ If :cdata:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
+
+ .. versionadded:: 3.2
+
+
wchar_t Support
"""""""""""""""