| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
They were read and written using the locale encoding, which could corrupt non-ASCII paths and made them non-portable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
I intend to check later today that the change creates no problems on an existing Window installation with both config and breakpoint files. |
Sorry, something went wrong.
There was a problem hiding this comment.
My quick check of reading, editing, saving and using both files showed no problems.
Sorry, something went wrong.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
Sorry, something went wrong.
|
GH-152555 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-152556 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-152557 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
IDLE opened its configuration files (.idlerc/config-*.cfg) and the breakpoints file without an explicit encoding, so they used the locale encoding. Non-ASCII data — such as non-ASCII paths in the breakpoints file or help-source URLs in the config — could be corrupted, and the files were not portable between environments.
Read them as UTF-8 with errors='replace' and write them as UTF-8, matching the long-standing treatment of recent-files.lst.
Since UTF-8 mode is the default from 3.15 (PEP 686), this is mostly a no-op on current main except under -X utf8=0; the behavioral fix matters on the 3.13 and 3.14 backports, where the locale encoding is still used.
Reading with errors='replace' instead of the locale codec also means a config file written in a different encoding no longer raises UnicodeDecodeError and crashes IDLE on startup; it is decoded lossily instead. This also fixes gh-84615.