views:

20

answers:

1

Hi,

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 coming; That is why we are taking this step.

Thanks for your time.

+1  A: 

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

Chris Valdivia
That did the trick. Thanks.
Tod1d