title: Java: Readers and Encodings
body: <p>Java's default encoding is <code>ASCII</code>. Yes? (See my edit below)</p>
  
  <p>When a textfile is encoded in <code>UTF-8</code>? How does a Reader know that he has to use <code>UTF-8</code>?</p>
  
  <p>The Readers I talk about are:</p>
  
  <ul>
  <li><code>FileReader</code>s</li>
  <li><code>BufferedReader</code>s from <code>Socket</code>s</li>
  <li>A <code>Scanner</code> from <code>System.in</code></li>
  <li>...</li>
  </ul>
  
  <h1>EDIT</h1>
  
  <p>It turns our the encoding is depends on the OS, which means that the following is not true on every OS:</p>
  
  <pre><code>'a'== 97
  </code></pre>