For anyone encountering this problem when running Django with Supervisor, the solution is to add e.g. the following to the supervisord
section of Supervisor's configuration:
environment=LANG="en_US.utf8", LC_ALL="en_US.UTF-8", LC_LANG="en_US.UTF-8"
This solved the problem for me in Supervisor 3.0a8 running on Debian Squeeze.
Also make sure Supervisor re-reads the configuration by running:
supervisorctl reread
supervisorctl restart myservice
(thanks @Udi)
For upstart, add in your /etc/init/myservice.conf
:
env LANG="en_US.utf8"
env LC_ALL="en_US.UTF-8"
env LC_LANG="en_US.UTF-8"`
(thanks @Andrii Zarubin; see Environment Variables in Upstart documentation for more information)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…