@@ -17,9 +17,9 @@ Add a new warning category ``EncodingWarning``. It is emitted when
1717``encoding `` option is omitted and the default encoding is a locale
1818encoding.
1919
20- The warning is disabled by default. New ``-X warn_encoding ``
21- command-line option and ``PYTHONWARNENCODING `` environment variable
22- are used to enable the warnings.
20+ The warning is disabled by default. New ``-X warn_default_encoding ``
21+ command-line option and ``PYTHONWARNDEFAULTENCODING `` environment
22+ variable are used to enable the warnings.
2323
2424``encoding="locale" `` option is added too. It is used to specify
2525locale encoding explicitly.
@@ -109,9 +109,9 @@ omitted and the default encoding is locale-specific.
109109Options to enable the warning
110110------------------------------
111111
112- ``-X warn_encoding `` option and the `` PYTHONWARNENCODING ``
113- environment variable are added. They are used to enable the
114- ``EncodingWarning ``.
112+ ``-X warn_default_encoding `` option and the
113+ `` PYTHONWARNDEFAULTENCODING `` environment variable are added. They
114+ are used to enable the ``EncodingWarning ``.
115115
116116``sys.flags.encoding_warning `` is also added. The flag represents
117117``EncodingWarning `` is enabled.
@@ -255,8 +255,8 @@ Using ``open(filename)`` to read text files encoded in UTF-8 is a
255255common mistake. It may not work on Windows because UTF-8 is not the
256256default encoding.
257257
258- You can use ``-X warn_encoding `` or `` PYTHONWARNENCODING=1 `` to find
259- this type of mistake.
258+ You can use ``-X warn_default_encoding `` or
259+ `` PYTHONWARNDEFAULTENCODING=1 `` to find this type of mistake.
260260
261261Omitting ``encoding `` option is not a bug when opening text files
262262encoded in locale encoding. But ``encoding="locale" `` is recommended
0 commit comments