On 08Jul2019 12:30, Jon LaBadie <mut...@jgcomp.com> wrote:
On Mon, Jul 08, 2019 at 05:53:22AM -0500, Peng Yu wrote:
`mutt -D` prints 'charset="iso-8859-1"' when it runs in a
non-interactive bash session scheduled by crontab.
But the same command prints 'charset="utf-8"' when it runs in an
interactive bash session. I suspect that this is affected by an
Does anybody know why there is such a difference?
Processes run by cron do not mimic your login environment.
If you need specific things set that are typically set in
.profile etc., you need to set them in your crontab file
or the executed script.
You can wire basic environment variables into the crontab. The usual
example is the MAILTO environment variable or a basic PATH, but you can
easily set locale relevant variables as well.
The "locale" command reports the current (computed) locale settings.
Here's mine just now:
My only actual environment variables are these:
You could put something equivalent in your crontab.
See "man locale" and also the other manual entries referenced in its SEE
ALSO section at the bottom.
Cameron Simpson <c...@cskk.id.au>