summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/unicode.rst
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-02-10 23:32:18 (GMT)
committerGitHub <noreply@github.com>2020-02-10 23:32:18 (GMT)
commitbf15d5b775c31e65584926998ff141edc75226d4 (patch)
tree8e25b9958980deacd14731fe169c682b9f6c9fd8 /Doc/c-api/unicode.rst
parent95d024d585bd3ed627437a2f0cbc783c8a014c8a (diff)
downloadcpython-bf15d5b775c31e65584926998ff141edc75226d4.zip
cpython-bf15d5b775c31e65584926998ff141edc75226d4.tar.gz
cpython-bf15d5b775c31e65584926998ff141edc75226d4.tar.bz2
Correct the documented default encoding (GH-18429)
From the source for `PyUnicode_Decode`, the implementation is: ``` if (encoding == NULL) { return PyUnicode_DecodeUTF8Stateful(s, size, errors, NULL); } ``` which is pretty clearly not defaulting to ASCII. --- I assume this needs neither a news entry nor bpo link.
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r--Doc/c-api/unicode.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 77f123c..96d77c4 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -978,7 +978,7 @@ have the same semantics as the ones of the built-in :func:`str` string object
constructor.
Setting encoding to ``NULL`` causes the default encoding to be used
-which is ASCII. The file system calls should use
+which is UTF-8. The file system calls should use
:c:func:`PyUnicode_FSConverter` for encoding file names. This uses the
variable :c:data:`Py_FileSystemDefaultEncoding` internally. This
variable should be treated as read-only: on some systems, it will be a