Developer forum

Forum » Templates » mailto showing ÆØÅ

mailto showing ÆØÅ


Reply

I had a problem with æøå in the mailto: function. The Dynamicweb supports solution was to make a change on the mailclient, not easy. (mga.net.dynamicweb.dk/files/filer/mailtolink.html)
 
But have a solution I would like to share. Maybe others have had the same issue, or a better solution.

 

I have included a JavaScript to the page including this function.

<script type="text/javascript" language="javascript1.1">
function replaceChar(linkref)
{
linkref.href = linkref.href.replace(/%C3%B8/g,"ø");
linkref.href = linkref.href.replace(/%C3%A6/g,"æ");
linkref.href = linkref.href.replace(/%C3%A5/g,"å");
linkref.href = linkref.href.replace(/%C3%98/g,"Ø");
linkref.href = linkref.href.replace(/%C3%86/g,"Æ");
linkref.href = linkref.href.replace(/%C3%85/g,"Å");
return true;
}
</script>

Now I add a onclick="return replaceChar(this)" to my mailto link..

 

<p style="text-align: center">
    <a onclick="return replaceChar(this)" href="mailto:aak@pro2.dk?subject=%C3%A6%C3%B8%C3%A5&amp;body=%20%C3%86%C3%98%C3%85">         Send mail     </a> </p>

 

 


Replies

 
Reply

What if you save the file as UTF-8 and send the email as UTF-8 ?

 

// Dammark

 

You must be logged in to post in the forum