Send characters like é è à in a command line mail
I run CentOS 6, and made my first try with the "bsd-mailx" "mail" command line.#!/bin/bash export LANG=fr_FR.UTF-8 export LC_ALL=fr_FR.UTF-8 echo "Tâches du $( date +"%a %d %b %Y" -d "+1days" )" | mail -s "$( date +"%a %d %b %Y" -d "+1days" )" toto@rktmb.org
When current month is "August", "Août" in French, it is just the big mess: characters are not encoded!
I tried with
mail -a "Content-Type: text/plain; charset=UTF-8"
But it displayed right for the body, the subject was screwed yet
Then I switched to "mailx":
# yum remove bsd-mailx # yum install mailx
I tried with
mail -S sendcharsets=utf-8,iso-8859-1
And this works!