Skip to content

Commit 245cd6c

Browse files
authored
gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)
Document how TextIOWrapper interacts with UTF-8 mode
1 parent bd2ed7c commit 245cd6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/io.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,8 @@ Text I/O
965965
:class:`TextIOBase`.
966966

967967
*encoding* gives the name of the encoding that the stream will be decoded or
968-
encoded with. It defaults to :func:`locale.getencoding`.
968+
encoded with. In :ref:`UTF-8 Mode <utf8-mode>`, this defaults to UTF-8.
969+
Otherwise, it defaults to :func:`locale.getencoding`.
969970
``encoding="locale"`` can be used to specify the current locale's encoding
970971
explicitly. See :ref:`io-text-encoding` for more information.
971972

0 commit comments

Comments
 (0)