1

I sometimes have to send emails in a German and I need to use ö ä ß etc... I have text written containing these letter and using alert() they appear just fine. I have code to send an email :

    var link = "mailto:" + SendTo
         + "&cc= " 
         + "&subject=" + escape(subjectLine)
         + "&body=" + escape(BodyText);
         window.location.href = link;

When I click a button to send the email, the text is missing these foreign letters e.g gruß comes out as gru. Do I need to put anything in here to make sure these letter don't disappear?

Thank you in advance

Siobhan Holubicka
  • 147
  • 1
  • 4
  • 17

1 Answers1

1

The following articles shows how to decode the letters using javascript :

Javascript decoding html entities

function decodeHtml(html) {
    var txt = document.createElement("textarea");
    txt.innerHTML = html;
    return txt.value;
}

HTML Entity Decode

Using jquery:

varTitle = $('<textarea />').html("Chris&apos; corner").text();
Community
  • 1
  • 1
Khaled Obaid
  • 275
  • 3
  • 13