
On Tue, Aug 30, 2016 at 8:14 AM, Victor Stinner <victor.stinner@gmail.com> wrote:
I proposed the idea, but I'm not sure that we can have a single option for Linux and Windows. Moreover, I never really worked on trying to implement "-X utf8" on Linux, because it looks like the "misconfigured system" are less and less common nowadays. I see very few user requests in this direction.
Some people loves tiny Linux image for Docker and RasberryPi. They doesn't has any locale other than C. Some OPs loves LANG=C or LC_ALL=C to avoid troubles and unexpected performance regression caused by locale. (e.g. sort command is much slower on ja_JP.utf8). I want to write script using utf-8 for stdio and fsencoding. Sometimes, people runs my script in C locale. And sometimes runs in misconfigured locale because SSH sends LANG that system doesn't have. So I wonder if Python has Force UTF-8" option. And if the option is configure option or site-wide installation option, because: * command line option cannot be set in shebang * Setting environment variable may be forgetten when writing scripts like crontab. The option may make startup bit faster, because it can skip setting locale in startup. Any thoughts? How should the option be set? -- INADA Naoki <songofacandy@gmail.com>