I have following command in a cronjob:
*/5 * * * * php /var/www/domain/yii rss/parse
It outputs email in a wrong charset:
Content-Type: text/plain; charset=ANSI_X3.4-1968
But when i launch that command directly in CLI and output it to a log:
php /var/www/domain/yii rss/parse > log
I get the right encoding – UTF-8
Already tried to set lang in /etc/environment:
LANG=en_US.UTF-8
Restarted the cron, but still it uses ANSI via CRON. Any ideas?
Best Answer
Solved my issue by adding in to a crontab:
At the top of file i wrote:
Now all of my cron job email's are in UTF-8 Charset.