views:

613

answers:

3

I'm looking to add some Chinese characters in a mailto: email link.

I've tried

<a href="mailto:[email protected]?subject=调查 / Inquiry">Email</a>

but when I click on the link the Outlook subject line shows:

调查亨德森 / Inquiry

I've also tried

<a href="mailto:[email protected]?subject=&#35843;&#26597; / Inquiry">Email</a>

but I get the same result as above.

I realize this may be an Outlook issue but I'm interested in finding out the correct way to implement this functionality.

A: 

I've been trying to put non-ASCII characters in subject lines for a while now. The bottom line is: it does not work reliably.

My (limited) understanding of why it does not work is that the standards say that email is 7-bit ASCII. The MIME standard gets around that by encoding the contents of the email differently. However: the subject line is not part of the contents. It's a header.

redtuna
+1  A: 

Since subject is in mail header, there is no way to know what encoding you are using. You need to use MIME Mail header extension defined in this RFC,

http://www.ietf.org/rfc/rfc2047.txt

The subject in Chinese would look like this,

Subject: =?GB2312?B?u7bTrbLOvNPDwLn61bm74Q==?=

But more and more clients assume UTF-8 encoding now. You might want try that also.

ZZ Coder
Changing to mailto: link to something like =?GB2312?B?u7bTrbLOvNPDwLn61bm74Q==?= will not solve the problem, it will just make the e-mail client encode the string "=?GB2312?B?u7bTrbLOvNPDwLn61bm74Q==?=" using the relevant transport encoding. The problem here is Outlook.
bzlm
A: 

It's cumbersome but possible, here is a good article that discusses both the standard compliant way of an ideal world and real world scenarios with Internet Explorer.

Josef