Link to home
Start Free TrialLog in
Avatar of vgnuser
vgnuser

asked on

Special Characters NOT displaying properly in javascript MAILTO

I have a Javascript mailto function embedded in my web page, whose encoding is set to UTF-8. So the special characters such as characters showing French accent and Chinese characters show up fine on the web page.

However, when I try to use the maito function, the subject and body having these French and Chinese characters get distorted in Outlook

Please see code below. How do I fix this?
mailto function:
 
function sendEmaill() {
	    window.location.href="mailto:?subject=Votre ami vous a invité à consulter un lien sur le site Web Google&body=On vous a invité à consulter un lien du site Web Google, www.google.com. Cliquez sur le lien ci-dessous pour afficher la page :%0A%0D" + escape(window.document.location);
	}
 
 
calling code:
 
Send to friend: <a href="javascript:sendEmail()">Send a friend</a>

Open in new window

mailto-screenshot.doc
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial