I am using the mailto URI scheme in my website for emailing the current page.
The problem is i use Hindi as the subject in the mailto link
Example
<a href="mailto:test@gmail.com?subject=मानक हिन्दी">Testing</a>
When the link is clicked, the Outlook(version 6) opens and it displays some unreadable characters as subject instead of "मानक हिन्दी" i.e i get "'मानक हिनà¥à¤¦à¥€"
I am using PHP so i tried using urlencode, utf8_encode and other similar functions and it is of no use. And the page's default character set is UTF-8
When i directly paste the text मानक हिन्दी, it works.
But i need it as a mailto link... What will be the solution ?
Unfortunately this can only be fixed at the Outlook end, by setting the option ‘Allow UTF-8 support for the mailto: protocol’. (In 2010 this is under Options -> Advanced -> International options.)
Otherwise, and by default, Outlook will use the user's locale-specific desktop default encoding (the ‘ANSI’ code page) which is never UTF-8. This makes using non-ASCII characters in a mailto: URL so unreliable as to be effectively useless. (Even more than the normal unreliability of subject=
.)
In general the idea to URL-encode the non-ASCII string was the right one: using a URI like:
<a href="mailto:test@gmail.com?subject=%E0%A4%AE%E0%A4%BE%E0%A4%A8%E0%A4%95%20%E0%A4%B9%E0%A4%BF%E0%A4%A8%E0%A5%8D%E0%A4%A6%E0%A5%80">Testing</a>
Is more reliable than the IRI format with the raw Unicode. However this does not address the Outlook issue.