notify: how to get utf-8 characters in commit messages into emails?

Mads Kiilerich mads at kiilerich.com
Sun May 25 11:37:38 UTC 2014


On 05/25/2014 11:39 AM, Thomas Klausner wrote:
> The problem I'm seeing is that when the commit message contains utf-8
> characters like Umlaut-a ("ä", but who knows what my mailer will make
> of this), the commit mail is sent with the following headers:
>
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit

Mercurial's own notifications also get this wrong - 
http://selenic.com/pipermail/mercurial-devel/2013-July/052176.html .

The reason is most likely that the hg process is running in the C locale 
(or some weird 8 bit locale). Depending on your OS, you could set 
LANG=en_US.utf8 or launch Mercurial with --encoding utf-8.

/Mads



More information about the Mercurial mailing list