Marc-Andre Lemburg <[email protected]> added the comment: Martin v. Löwis wrote: > > Martin v. Löwis <[email protected]> added the comment: > >> An clean alternative would be adding LC_* variable parsing code to >> Python to avoid the setlocale() call altogether. > > That would be highly non-portable, and repeat the mistakes of > getdefaultlocale.
You say that often, but I don't really know why. It's certainly portable between various Unix platforms, perhaps not Windows, but then i18n on Windows is a different story altogether. BTW: For Windows, you can adjust setlocale() to work thread-based using: _configthreadlocale() (http://msdn.microsoft.com/de-de/library/26c0tb7x(v=vs.80).aspx) Perhaps we ought to expose this in _locale and use it in getdefaultlocal() on Windows to query the locale settings via the pseudocode I posted. ---------- _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue6203> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
