Skip to content

Commit bb0a857

Browse files
gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)
Document how TextIOWrapper interacts with UTF-8 mode (cherry picked from commit 245cd6c) Co-authored-by: Malcolm Smith <[email protected]>
1 parent 8a05dbe commit bb0a857

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
@@ -950,7 +950,8 @@ Text I/O
950950
:class:`TextIOBase`.
951951

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

0 commit comments

Comments
 (0)