tags:

views:

125

answers:

2

Dear all,

I am manipulating german text in jQuery.

  1. Maßnahme
  2. Text

Now I need to Check these text in my switch case

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

Is there equvalent Unicode to check the german text?

+1  A: 

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.

kgiannakakis
A: 

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.

splattne