summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-10-15 12:04:23 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-10-15 12:04:23 (GMT)
commitf3170ccef8809e4a3f82fe9f82dc7a4a486c28c1 (patch)
treeb96ab0a2584f511758bad3e4ccac6c4e3ed43954 /Doc/c-api
parent6a4aff10f0f1c34f488d5d0f932eea1fb3483dbf (diff)
downloadcpython-f3170ccef8809e4a3f82fe9f82dc7a4a486c28c1.zip
cpython-f3170ccef8809e4a3f82fe9f82dc7a4a486c28c1.tar.gz
cpython-f3170ccef8809e4a3f82fe9f82dc7a4a486c28c1.tar.bz2
Use locale encoding if Py_FileSystemDefaultEncoding is not set
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/unicode.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index dac01a4..d9a48d6 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -415,7 +415,8 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
Decode a string using :c:data:`Py_FileSystemDefaultEncoding` and the
``'surrogateescape'`` error handler, or ``'strict'`` on Windows.
- If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
+ If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the
+ locale encoding.
.. versionchanged:: 3.2
Use ``'strict'`` error handler on Windows.
@@ -426,7 +427,8 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
Decode a null-terminated string using :c:data:`Py_FileSystemDefaultEncoding`
and the ``'surrogateescape'`` error handler, or ``'strict'`` on Windows.
- If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
+ If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the
+ locale encoding.
Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length.
@@ -440,7 +442,8 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
``'surrogateescape'`` error handler, or ``'strict'`` on Windows, and return
:class:`bytes`.
- If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
+ If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the
+ locale encoding.
.. versionadded:: 3.2