Avoiding an international mailto maelstrom

by Michael S. Kaplan, published on 2007/07/21 20:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/07/21/3993622.aspx


The mail I got the other day from Wes Miller (yes, that Wes Miller!) forwarding someone else's question:

Hi all,

We encountered a problem when localizing the subject of mailto hyper link. The sample html is below:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contact Us</title>
</head>
<body>
<a href="mailto:someone@domain.com?subject=最終更新">Contact Us</a>
</body>
</html>

When user clicks the link, the subject in outlook can not be rendered correctly. How can we resolve/workaround this problem? Your comment will be very much appreciated.

Thanks in advance.

(For people who want to test the results in their own browser/mail client, I'll reproduce the link here: Contact Us)

As regular readers can probably guess (especually if they remember this post!), the text (Japanese for something like "Final Renewal" I think?), looks like: 最終更新

So the browser was perhaps being smart enough to take the charset info of the page and use it but then the mail client was not being smart enough to see it as UTF-8.

It can be tempting to look to the new IE7 "International" setting about using UTF-8 for mailto links:

(more on this setting in the IEBlog post International Mailto URIs in IE7 for those who are curious)

But I don't think that setting will always solve the problem here since, as the post indicates:

First, you must have a mail program that correctly handles these mailto URIs, such as Outlook 2007 or Mozilla Thunderbird. Second, you must ensure that the ‘Use UTF-8 for mailto links’ checkbox on the ‘Advanced’ tab of your Internet Options is checked.

So you have to be running a browser that does the right thing, along with the setting in the browser configured properly, plus a mail client that can read it.

Though to be honest I am seeing the right results in IE6 too even without that setting (though I still get the wrong results in some mail clients!

Since the text in question was UTF-8 being read as if it were not, it appears that the first two conditions were being met (or the browser was doing the right thing anyway), and that the problem was that the mail client did not understand what to do with the results it was being asked to make use of.

Well, I guess the article will help if it encourages you to upgrade your mail client to a program that understandd UTF-8, so you can avoid the international mailto maelstrom!

And it very nice to see products working to better follow standards, too....

 

This post brought to you by   (U+0f59, a.k.a. TIBETAN LETTER TSA)


# jonlfh on 22 Jul 2007 1:16 PM:

According to the WWWJDIC:

-最終 【さいしゅう】 (n) last; final; closing;

-更新 【こうしん】 (n,vs) renewal; update; innovation; renovation;

but I think the more appropriate translation would be "update" (in the context of software, website, etc). So the text reads "Final Update". BTW, it means about the same thing in Chinese too.

# Wilhelm Svenselius on 23 Jul 2007 1:32 AM:

I tried clicking the link from IE7 and Firefox, opening into Outlook 2007, on Vista. In both cases, the text rendered perfectly.

# Michael S. Kaplan on 23 Jul 2007 12:09 PM:

That sounds like very good news!

# Øyvind Volden on 18 Nov 2008 9:05 AM:

I can verify that this works with Outlook 2007, since you can choose to use UTF-8 with the mailto protocol. However, I'm having difficulties with Outlook 2003, where this options doesn't exist. Anyone know if there's a workaround for Outlook 2003?


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day