Author vstinner
Recipients benjamin.peterson, gz, poolie, r.david.murray, vstinner
Date 2011-12-21.00:26:02
SpamBayes Score 2.85874e-05
Marked as misclassified No
Message-id <>
> There are two problems with this: one is just the practical
> one that it scales poorly to have to tell every user to do this
> and to take them through working out how to set this in a way
> that covers cron jobs, daemons, things run over ssh, etc.

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/


If you want to handle any filename without having to care of the locale, the simplest solution is to use the bytes type to store filenames.
Date User Action Args
2011-12-21 00:26:03vstinnersetrecipients: + vstinner, benjamin.peterson, r.david.murray, gz, poolie
2011-12-21 00:26:03vstinnersetmessageid: <>
2011-12-21 00:26:03vstinnerlinkissue13643 messages
2011-12-21 00:26:03vstinnercreate