开发者

Outlook Converts Unicode Email Address to Garbage

I am working on an ASP.NET project where we are updating all of our websites to support Unicode values. In one place, we are allowing users to enter their email address as Unicode. I use the following code snippet to display the "mailto" address hyperlink:

Response.Write("<a href='mailto:" + Server.UrlEncode(email.EmailAddress) + "'>" + email.EmailAddress + "</a>");

When I click on this link, it opens Outlook, but the email address displays as garbage text. Any ideas on how to resolve this issue?

From what I have heard, currently, email addresses only support ANSII characters, but Unicode characters are comin开发者_开发技巧g; That is why we are taking this step.

Thanks for your time.


If using Internet Explorer, do the following:

Tools >> Internet Options >> Advanced tab >> International grouping

Check the "Use UTF-8 for mailto links" box

This should cure your ills. The mailto URL still shows up as UTF-8 hex encoded in the status bar, but Outlook now proerly fills in the To: field.

Hope this helps.

Cheers, Chris

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜