gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)

Document how TextIOWrapper interacts with UTF-8 mode
This commit is contained in:
Malcolm Smith 2025-05-03 02:20:10 +01:00 committed by GitHub
parent bd2ed7c7ce
commit 245cd6c532
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -965,7 +965,8 @@ Text I/O
:class:`TextIOBase`.
*encoding* gives the name of the encoding that the stream will be decoded or
encoded with. It defaults to :func:`locale.getencoding`.
encoded with. In :ref:`UTF-8 Mode <utf8-mode>`, this defaults to UTF-8.
Otherwise, it defaults to :func:`locale.getencoding`.
``encoding="locale"`` can be used to specify the current locale's encoding
explicitly. See :ref:`io-text-encoding` for more information.