Message389091
> Is it about the current implementation of the PEP 597, or are you thinking at the future Python which would use UTF-8 by default?
I had forgot to consider about UTF-8 mode while finishing PEP 597. If possible, I want to ignore UTF-8 mode when `encoding="locale"` is specified from Python 3.10.
Otherwise, behavior will be changed between Python 3.10 and 3.11.
> Currently, getpreferredencoding(False) respects the behavior that you described, no?
getpreferredencoding(False) respects UTF-8 mode. That's what PEP 597 said (because the PEP don't define behavior in UTF-8 mode) and GH-19481 implements.
But it is not what I want for now. I want to ignore UTF-8 mode when `encoding="locale"` is specified.
This is almost "only in Windows" issue, and users can use `encoding="mbcs"` in Windows-only script.
But `encoding="locale"` is new and recommended way to specify using "locale" encoding explicitly. When user specify "locale" encoding explicitly, I think we should respect it regardless UTF-8 mode. |
|
Date |
User |
Action |
Args |
2021-03-19 14:12:25 | methane | set | recipients:
+ methane, lemburg, vstinner, eryksun |
2021-03-19 14:12:25 | methane | set | messageid: <1616163145.7.0.944015798705.issue43552@roundup.psfhosted.org> |
2021-03-19 14:12:25 | methane | link | issue43552 messages |
2021-03-19 14:12:25 | methane | create | |
|