title: Charset.defaultCharset() get different result under JDK1.7 and JDK 1.6
body: <p>I am testing my application's i18n compatibility.
  I have a English version of Windows 7 which mean the system's display language is English. And I set the system locale as Chinese for non-unicode application.</p>
  
  <p>My application encountered problems when exporting Html files with Chinese character under jdk1.6, but works fine when running under jdk1.7.</p>
  
  <p>I debugged it and found the direct reason was that <code>Charset.defaultCharset()</code> returned different values. </p>
  
  <p>Under jdk1.7 <code>Charset.defaultCharset()</code> returned <code>GBK</code> which is the charset for chinese.</p>
  
  <p>Under jdk1.6 <code>Charset.defaultCharset()</code> returned <code>window_1252</code> which is charset for Latin language.</p>
  
  <p>I know the problem can be solved by designate charset,say <code>utf-8</code>, in code.</p>
  
  <p>But I want to know why <code>Charset.defaultCharset()</code> return different values under JDK1.7 and JDK 1.6 .</p>