By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,945 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,945 IT Pros & Developers. It's quick & easy.

accents in e-mail

P: n/a
jim
Hi,

I can't gte accents in the subject and body fields of an e-mail !
This is my code :

document.location.href = 'mailto:we*******@mysite.com?subject=the subject is
éléphant&body=elephant is said éléphant in french !' ;

When the e-mail appears, I get weird characters instead of the wanted clean
accents.
Can you help me please ?

Thanks in advance,

--
jim
Jan 7 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
jim
Hi,
>
I can't gte accents in the subject and body fields of an e-mail !
This is my code :

document.location.href = 'mailto:we*******@mysite.com?subject=the subject
is éléphant&body=elephant is said éléphant in french !' ;

When the e-mail appears, I get weird characters instead of the wanted
clean accents.
Can you help me please ?

Thanks in advance,

--
jim
well... it works in IE, but not on firefox 1.5 neither opera 9.10

--
jim
Jan 7 '07 #2

P: n/a
VK

jim wrote:
Hi,

I can't gte accents in the subject and body fields of an e-mail !
Because you have to escape the string values: either by yourself using
escape() method or let do it to a form.
This is my code :
document.location.href = 'mailto:we*******@mysite.com
Uhm... "Navigate browser to e-mail message"... Conceptual... but rather
crazy, is not it? ;-)

<html>
<head>
<title>1</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>

<body onload="
var frm = document.forms['email'];
frm.action = 'mailto:sc**********@yahoo.com';
frm.submit();

document.links[0].click();
">

<form name="email" action=""
><input type="hidden" name="subject" value="Always escape mailto data!"
<input type="hidden" name="body" value="й"
</form>
<p
><a
href="mailto:sc**********@yahoo.com?subject=Always %20escape&body=%E9"
>mailto</a></p>
</body>
</html>

Jan 7 '07 #3

P: n/a
jim
"VK" <sc**********@yahoo.coma écrit dans le message de news:
11**********************@42g2000cwt.googlegroups.c om...

jim wrote:
Hi,

I can't gte accents in the subject and body fields of an e-mail !
Because you have to escape the string values: either by yourself using
escape() method or let do it to a form.
This is my code :
document.location.href = 'mailto:we*******@mysite.com
Uhm... "Navigate browser to e-mail message"... Conceptual... but rather
crazy, is not it? ;-)

<html>
<head>
<title>1</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>

<body onload="
var frm = document.forms['email'];
frm.action = 'mailto:sc**********@yahoo.com';
frm.submit();

document.links[0].click();
">

<form name="email" action=""
><input type="hidden" name="subject" value="Always escape mailto data!"
<input type="hidden" name="body" value="?"
</form>
<p
><a
href="mailto:sc**********@yahoo.com?subject=Always %20escape&body=%E9"
>mailto</a></p>
</body>
</html>
thank you for your solution.
the escape function is what I needed.
It works in IE and FF ...but not Opera !
Jan 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.