title: Characters "æ", "ø" "æ" in Java Strings (Windows)
body: <p>For some reason a String that is assigned the letter <em>å</em> by using the Scanner class does not equal a String that is assigned <em>å</em> by using the "normal" way:  <code>String a = "å"</code> - <strong><em>Why is that?</em></strong></p>
  
  <pre><code>import java.util.*;
  
  public class UTF8Test {
  public static void main(String [] args) {
  
      String [] Norge = {"løk", "hår", "vår", "sær", "søt"};
  
      Scanner input = new Scanner(System.in);
  
      String  test = input.nextLine();  //I enter løk here
      System.out.println(test);
      System.out.println(Norge[0]);
  
      for(int i = 0; i &lt; Norge.length; i++) {
          if(Norge[i].equals(test) ) {
              System.out.println("YES!!");
          }
      }
  }
  }
  </code></pre>
  
  <p>The compiler will show this:</p>
  
  <p>løk</p>
  
  <p>løk</p>
  
  <p>l├©k</p>