title: Why can't the program read UTF-8 characters using Scanner?
body: <p>I initialized the <strong>Scanner</strong> class object in this manner:  </p>
  
  <pre><code>Scanner scanner = new Scanner(new File("data.txt"),"utf-8");  
  </code></pre>
  
  <p>When i try to read a file with chars like ç or é, <code>scanner.hasNextLine()</code> returns false, scanner don't read nothing.</p>
  
  <p>I tried to use "iso-8859-1". And file reading was successful. But file is UTF-8 file and chars like 'ç' are displayed as "Ă§".</p>
  
  <p>Please help me solve the problem and make the program properly read and display UTF-8 characters.</p>