file.write() of non-ASCII characters differs in Interpreted Python than in script run

Marko Rauhamaa marko at pacujo.net
Thu Aug 27 07:59:42 CEST 2015


Chris Angelico <rosuav at gmail.com>:

> Apache itself most likely is running with LANG=C and other
> environmental changes. It's not a Python-specific thing.

The topic is discussed also at: <URL: http://blog.dscpl.com.au/2014/0
9/setting-lang-and-lcall-when-using.html>.

Personally, I think the C locale is the only safe choice for Apache. CGI
shell scripts, in particular, can act in suprising ways when the locale
is changed.


Marko


More information about the Python-list mailing list