title: Java: Turkish Encoding Mac/Windows
body: <p>I have a problem with turkish special characters on different machines. The following code:</p>
  
  <pre><code>String turkish = "ğüşçĞÜŞÇı";
  
  String test1 = new String(turkish.getBytes());
  String test2 = new String(turkish.getBytes("UTF-8"));
  String test3 = new String(turkish.getBytes("UTF-8"), "UTF-8");
  
  System.out.println(test1);
  System.out.println(test2);
  System.out.println(test3);
  </code></pre>
  
  <p>On a Mac the three Strings are the same as the original string. On a Windows machine the three lines are (Printed with the Netbeans 6.7 console): </p>
  
  <pre><code>?ü?ç?Ü?Ç?
  ÄŸÃ¼ÅŸÃ§ÄžÃœÅžÃ‡Ä±
  ?ü?ç?Ü?Ç?
  </code></pre>
  
  <p>I don't get the problem. </p>