I'm trying to create a mailto link that contains french accented characters as the subject and email body. Both HTML and URI encoding the chars does not work. Here is my code:
<a href="mailto:%20?subject=ce%20titre%20est%20cass%C3%A9.&body=travaux%20deja!%20cesser%20d'%C3%AAtre%20t%C3%AAtu">SEND EMAIL</a>
Same result occurs without URI encoding:
<a href="mailto:?subject=ce titre est cassé&body=travaux deja! cesser d'être têtu">SEND EMAIL</a>
No Matter how i do it, the new email opens up with the broken characters. URI encoded Spaces and line-breaks work fine, but anything that is not ANSI is broken. I should note that I am testing in both english and french versions of MS Outlook 2007. Anyone know how to get this to work?
For example, with mootools (but could be another framework or even 'raw' javascript), I usually do this, and it works mac/pc with the main browsers/clients:
Bye!
Got it! This may or may not be a bug in Microsoft Outlook/Entourage. I changed my default mail reader to Mail.app and it works beautifully with urlencoding. The (maybe) bug only appears to affect one of the 2 accented e characters in your example. Perhaps Outlook/Entourage is not handling miltibyte UTF8 chars correctly?
Everything in mail header (including subject) must be MIME-encoded according to this RFC,
http://www.ietf.org/rfc/rfc2047.txt
It's not trivial to do this but you can find code to handle it in most languages.
The properly encoded text looks like this,
EDIT: Try this to see if it's what you want,
Replace email with your address.
In IE 8 its an setting option. Tools -> Options -> Advanced. Under International check the option "Use UTF-8 for mailto links".
Under Windows XP this setting is disabled by default. Under Windows 7 its enabled by default.
Hope this helps