title: Swedish characters don't compare correctly
body: <p>For some reason If/else statements isn't working correctly for me in C++ </p>
  
  <p>The problem is that when a variabel is equal to the right (höger), it won't output the If statement, instead it will go on to the else statement. If I replace the letter 'ö' with say 'o' so it becomes 'hoger' instead, then the if statement will work. So whenever I write the word 'höger' it won't go to the if statement, instead it will go to the else statement. However if I make the variabel equal to 'hoger', and then I write 'hoger', it will work. How can I make it possible writing 'höger' were the If statement recognizes it instead? It's as if Swedish letters don't work.</p>
  
  <p>My code look like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  
  int main() {
      setlocale(LC_ALL,"");
  
  
      string test; // Define variabel
      cout &lt;&lt; " Höger elle vänster"&lt;&lt;endl; // Right or left
      cin &gt;&gt; test;
  
  
      if(test == "höger") { // If right, then output this.
  
          cout &lt;&lt;"Du valde höger"&lt;&lt;endl;
  
      } 
  
      else if(test == "vänster") { // If left, then output this
  
          cout &lt;&lt;"Du valde vänster"&lt;&lt;endl;
  
      } else {
  
          // Do this
  
      }
  
  
  }
  </code></pre>