Martin Pool <m...@sourcefrog.net> added the comment: On 21 December 2011 11:26, STINNER Victor <rep...@bugs.python.org> wrote: > I never checked which locale is used by default for programs called by cron. > So I checked: on Fedora 16, programs start with a very few environment > variables, and LANG and LC_ALL are not set. You can add "LANG=fr_FR.UTF-8" > (for example) to /etc/environment to set the default language for the whole > system (for all programs). I checked, it works with cron. Or if you don't > want to affect all programs, it is maybe safer to only set the locale for one > specific program in your crontab by adding "LANG=fr_FR.UTF-8 " before you > command. Example: > > * * * * * LANG=fr_FR.UTF-8 /home/haypo/test.sh
That is the correct kind of configuration. When I say it scales poorly I mean that every user running a Python program on a unicode system needs to insert this configuration in every relevant place, and they need to work this out from what is typically a fairly cryptic message. (bzr just added a workaround for this, but for other programs it still exists.) Also, my other point, is that people may very well want their cron scripts to send ascii output but cope with unicode filenames. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13643> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com