Neal Norwitz wrote: > > I feel I'm lacking some link here: why do you think we should do that? > > [EMAIL PROTECTED] ~/build/python/svn/clean-ish $ LC_ALL=de_DE ./python > >>> import locale > >>> locale.setlocale(locale.LC_ALL) > 'C' > >>> locale.setlocale(locale.LC_ALL, 'de_DE') > 'de_DE' > > I would have expected the first call to setlocale() to return de_DE.
the locale is a program-specific setting (handled by the C runtime library), and is set to "C" by default. if you want to use a specific locale, you have to call setlocale to indicate that you really want a non-default locale. the "" argument is just a con- venience; it tells the C runtime library to set the locale based on OS-level language settings (e.g. LANG on Unix, control panel settings on Windows, etc). LANG in itself isn't the locale; it's just a way to tell a locale-aware program what the preferred locale is. </F> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com