Using UTF-8 characters on an e-mail subject
If you have sent e-mails in a different language than English or using characters outside the ASCII range you have probably already used utf8 to send them.
Specifying the use of UTF-8 in the body of an e-mail is very similar to doing it for a HTTP response. You can specify the content-type in an e-mail header like this:
1
Content-Type: text/plain; charset=utf-8
But there is catch. The subject line of an e-mail is a header by itself, and headers must contain only ASCII characters. Happily, there is a work around. RFC 1342 is a recommendation that provides a way to represent non ASCII characters inside e-mail headers in a way that won’t confuse e-mail servers.