> It seems to based on an assumption that the C locale is always some kind of > pathology. Admittedly, it sometimes is a result of misconfiguration or a > mistake. (But I don't see why it's the interpreter's job to correct such > mistakes.) However, in some cases the C locale is a normal environment for > system services, cron scripts, distro package builds and whatnot.
I think "C locale + use UTF-8 for stdio + fs" is common setup, especially for servers. It's not mistake or misconfiguration. Perl, Ruby, Rust, Node.JS and Go can use UTF-8 without any pain on C locale. And current Python is painful for such cases. So I strongly +1 for PEP 540 (UTF-8 mode). On the other hand, PEP 538 is for for locale-dependent libraries (like curses) and subprocesses. I agree C locale is misconfiguration if user want to use UTF-8 in locale-dependent libraries. And I agree current PEP 538 seems carrying it a bit too far. But locale coercing works nice on platforms like android. So how about simplified version of PEP 538? Just adding configure option for locale coercing which is disabled by default. No envvar options and no warnings. Regards, _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com