Skip to content

Commit bf15d5b

Browse files
authored
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.
1 parent 95d024d commit bf15d5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/c-api/unicode.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ have the same semantics as the ones of the built-in :func:`str` string object
978978
constructor.
979979
980980
Setting encoding to ``NULL`` causes the default encoding to be used
981-
which is ASCII. The file system calls should use
981+
which is UTF-8. The file system calls should use
982982
:c:func:`PyUnicode_FSConverter` for encoding file names. This uses the
983983
variable :c:data:`Py_FileSystemDefaultEncoding` internally. This
984984
variable should be treated as read-only: on some systems, it will be a

0 commit comments

Comments
 (0)