| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -172,11 +172,35 @@ production systems where traditional profiling approaches would be too intrusive | |
| Other language changes | ||
| ====================== | ||
|
|
||
| * Python now uses UTF-8_ as the default encoding, independent of the system's | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYou might mention the UTF-8 Mode earlier since it has other side effects documented in the UTF-8 Mode section, such as changing sys.stdout error handler and ignoring the locale encoding.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality"default encoding" is UTF-8 since Python 3.0. (e.g. sys.getdefaultencoding())
Sorry, something went wrong.
All reactions
|
||
| environment. This means that I/O operations without an explicit encoding, | ||
| e.g. ``open('flying-circus.txt')``, will use UTF-8. | ||
| UTF-8 is a widely-supported Unicode_ character encoding that has become a | ||
| *de facto* standard for representing text, including nearly every webpage | ||
| on the internet, many common file formats, programming languages, and more. | ||
|
|
||
| This only applies when no ``encoding`` argument is given. For best | ||
| compatibility between versions of Python, ensure that an explicit ``encoding`` | ||
| argument is always provided. The :ref:`opt-in encoding warning <io-encoding-warning>` | ||
| can be used to identify code that may be affected by this change. | ||
| The special special ``encoding='locale'`` argument uses the current locale | ||
| encoding, and has been supported since Python 3.10. | ||
|
|
||
| To retain the previous behaviour, Python's UTF-8 mode may be disabled with | ||
| the :envvar:`PYTHONUTF8=0 <PYTHONUTF8>` environment variable or the | ||
| :option:`-X utf8=0 <-X>` command line option. | ||
|
|
||
| .. seealso:: :pep:`686` for further details. | ||
|
|
||
| .. _UTF-8: https://en.wikipedia.org/wiki/UTF-8 | ||
| .. _Unicode: https://home.unicode.org/ | ||
|
|
||
| (Contributed by Adam Turner in :gh:`133711`; PEP 686 written by Inada Naoki.) | ||
|
|
||
| * Several error messages incorrectly using the term "argument" have been corrected. | ||
| (Contributed by Stan Ulbrych in :gh:`133382`.) | ||
|
|
||
|
|
||
|
|
||
| New modules | ||
| =========== | ||
|
|
||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Implement :pep:`686`: Enable :ref:`Python UTF-8 Mode <utf8-mode>` by | ||
| default. Patch by Adam Turner. |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.