Eryk Sun <eryk...@gmail.com> added the comment:
> If Python calls setlocale() per default now, it has served its purpose. Except not for embedding applications if configure_locale [1] isn't set. But in that case determining the default locale isn't Python's problem to solve. > My assumption is that nl_langinfo(CODESET) does not work on Windows > or gives wrong results. Is that incorrect ? There is no such function for CRT locales. I provided two alternatives that would allow implementing this consistent with POSIX, and thus avoid all of the "except on Windows..." disclaimers that have to explain (apologize) that only the process ANSI code page is used in Windows, and, for no good reason as far as I can tell, the LC_CTYPE locale encoding is completely ignored. --- [1] https://docs.python.org/3/c-api/init_config.html#c.PyPreConfig.configure_locale ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43552> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com