File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -123,17 +123,19 @@ encoding is not UTF-8 for most Windows users. For example::
123
123
with open("README.md") as f:
124
124
long_description = f.read()
125
125
126
- Additionally, while there is no concrete plan as of yet, Python may change
127
- the default text file encoding to UTF-8 in the future.
128
-
129
126
Accordingly, it is highly recommended that you specify the encoding
130
127
explicitly when opening text files. If you want to use UTF-8, pass
131
128
``encoding="utf-8" ``. To use the current locale encoding,
132
- ``encoding="locale" `` is supported in Python 3.10.
129
+ ``encoding="locale" `` is supported since Python 3.10.
130
+
131
+ .. seealso ::
132
+
133
+ :ref: `utf8-mode `
134
+ Python UTF-8 Mode can be used to change the default encoding to
135
+ UTF-8 from locale-specific encoding.
133
136
134
- When you need to run existing code on Windows that attempts to open
135
- UTF-8 files using the default locale encoding, you can enable the UTF-8
136
- mode. See :ref: `UTF-8 mode on Windows <win-utf8-mode >`.
137
+ :pep: `686 `
138
+ Python 3.15 will make :ref: `utf8-mode ` default.
137
139
138
140
.. _io-encoding-warning :
139
141
Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ can be read from :data:`sys.flags.utf8_mode <sys.flags>`.
159
159
See also the :ref: `UTF-8 mode on Windows <win-utf8-mode >`
160
160
and the :term: `filesystem encoding and error handler `.
161
161
162
+ .. seealso ::
163
+
164
+ :pep: `686 `
165
+ Python 3.15 will make :ref: `utf8-mode ` default.
166
+
162
167
163
168
.. _os-procinfo :
164
169
You can’t perform that action at this time.
0 commit comments