On Fri, Dec 8, 2017 at 7:22 PM, Victor Stinner <victor.stin...@gmail.com> wrote: >> >> Both of PEP 538 (locale coercion) and PEP 540 (UTF-8 mode) shares >> same logic to detect POSIX locale. >> >> When POSIX locale is detected, locale coercion is tried first. And if >> locale coercion >> succeeds, UTF-8 mode is not used because locale is not POSIX anymore. > > No, I would like to enable the UTF-8 mode as well in this case. > > In short, locale coercion and UTF-8 mode will be both enabled by the > POSIX locale. >
Hm, it is bit surprising because I thought UTF-8 mode is fallback of locale coercion when coercion is failed or disabled. As PEP 538 [1], all coercion target locales uses surrogateescape for stdin and stdout. So, do you mean "UTF-8 mode enabled as flag level, but it has no real effects"? [1]: https://www.python.org/dev/peps/pep-0538/#changes-to-the-default-error-handling-on-the-standard-streams Since coercion target locales and UTF-8 mode do same thing, I think this is not a big issue. But I want it is clarified in the PEP. Regards, --- INADA Naoki <songofaca...@gmail.com> _______________________________________________ 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