venkatachalam
venkatachalam

Reputation: 102439

jQuery in German text

I am manipulating German text in jQuery.

  1. Maßnahme
  2. Text

Now I need to check these texts in my switch case:

switch(compare){
    case 'Text':
        alert("Text");break;
    case 'Maßnahme':
        alert("Welcome");break;
    default:;
}

Is there equivalent Unicode to check the German text?

Upvotes: 2

Views: 298

Answers (2)

splattne
splattne

Reputation: 104050

Just a supplement to kgiannakakis's answer:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

If you use utf-8, be sure to save your files as UTF-8 encoded. Check the settings of your (text) editor.

Upvotes: 0

kgiannakakis
kgiannakakis

Reputation: 104188

Save your file in UTF8 encoding and the switch case should work.

Add the following in the head section:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

and make your server return content in UTF8.

Upvotes: 1

Related Questions