Search code examples
asp.netjavascripthtmlglobalization

How to get mailto working for IDN email IDs


I have mailto:test@维奈.com on an image which when clicked opens the email client, but the emailID appears as asas@维奈.com .

Any Idea how I can get mailto: link working for IDN domains?.


Solution

  • I think this is where punycode representation comes in. Punycode is a method of converting UTF-8 domain names into an ASCII string that will work in systems that can't deal with Internationalized Domain Names.

    test@维奈.com
    

    becomes

    mailto:[email protected]
    

    I expect there is a library for ASP.NET that can convert unicode domain names into such an ACE string.

    Related: Punycode online converter