In <[EMAIL PROTECTED]>, Sibylle Koczian wrote: >>>I'm writing a cgi script which only needs to run in a small LAN. I tried >>>to show dates in a reasonable format by using >>> >> >> That's the web server's locale appropriate date representation then. >> > > The web server is on my machine - doesn't it use its regional settings?
The settings are per user and stored in environment variables. Apache clears most of them at start. > I've seen a little more in the meantime: > > xx = locale.setlocale(locale.LC_ALL, '') > > # print HTML header, title, everything up to and including body tag > > print xx > > # print rest of page > > In the cgi script xx is "C" and not "de_DE.utf-8". Looks as if setlocale > isn't executed. `setlocale()` is executed but if there are no environment variables (LANG, LC_*) then the default locale `C` is chosen. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list