UTF8版Python
#Python #utf-8
open(filename) に警告を出さず、ゆっくりとUTF-8 by default everywhere な状況への移行を目指す。
実質的に Windows のみがlegacyエンコーディングを使っている状況なので、それをUTF-8に移行できればいい。
UTF-8 mode か UTF-8 manifest をオンの状態のインストーラーを配布して、ダウンロード統計でUTF-8への移行具合をモニタリングできないか?あるいは pip に locale.getpreferredencoding(False) を報告してもらう?
The difference with the PEP 597 (2nd) is now I propose to not change the subprocess.PIPE encoding in UTF-8 mode.
I need to reconsider about stdin/stdout encoding when they are redirected.
But Steve Dower said we need to emit a warning to everyone for are using the default encoding before the change.
He said
To change the default, we need to start warning when people use the default.
https://discuss.python.org/t/3122/16
Petr Viktorin agreed with Steve.
He said
we should start issuing warnings now.
https://discuss.python.org/t/3122/22
But later, he said
But yeah, that’s a lot of warnings.> I live in a very comfortable bubble of UTF-8 everywhere (with a few explicit exceptions), and I don’t think I can convince everyone else in this bubble that such warnings would be useful :‍(
https://discuss.python.org/t/3122/31
Paul Moore againsted warning.
https://discuss.python.org/t/pep-597-enable-utf-8-mode-by-default-on-windows/3122/37
warning が必要勢と嫌だ勢の合意を取るのは無理!
stdin/out/err のエンコーディングを ConsoleCP から取るのはどうか。