On Wed, Feb 20, 2013 at 5:53 AM, Albert-Jan Roskam <[email protected]> wrote: > There is an asymmetry in getlocale and setlocale. What is returned by > getlocale cannot be used as argument for setlocale.
getlocale executes localename = _setlocale(category), where _setlocale wraps the C runtime setlocale. Then it transforms the return string to a tuple using _parse_localename, which calls locale.normalize. The latter changes the language and encoding incorrectly on Windows. Instead, you could save the unparsed locale string: old_locale = setlocale(LC_ALL). _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
