title: Read line with Scanner
body: <p><strong>EDIT</strong> for further readers: the problem was that my input file was corrupted.</p>
  
  <p>I don't understand what I'm doing wrong :</p>
  
  <p>I was using this code :</p>
  
  <pre><code>    File f = new File("C:\\Temp\\dico.txt");
      BufferedReader r = null;
      try {
          r = new BufferedReader(new FileReader(f));
          String scan;
          while((scan=r.readLine())!=null) {
              if(scan.length()==0) {continue;}
              //treatment
          }
      } catch (FileNotFoundException ex) {
          Logger.getLogger(Lexique.class.getName()).log(Level.SEVERE, null, ex);
      } catch (IOException ex) {
          Logger.getLogger(Lexique.class.getName()).log(Level.SEVERE, null, ex);
      } finally {
          if(r!=null) try {
              r.close();
          } catch (IOException ex) {
              Logger.getLogger(Lexique.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  </code></pre>
  
  <p>Which is working fine. Now, for some reason, I wanted to change for a Scanner. My code became :</p>
  
  <pre><code>    File f = new File("C:\\Temp\\dico.txt");
      Scanner r = null;
      try {
          r = new Scanner(f);
          String scan;
          while(r.hasNextLine()) {
              scan = r.nextLine();
              if(scan.length()==0) {continue;}
              //treatment
          }
      } catch (FileNotFoundException ex) {
          Logger.getLogger(Lexique.class.getName()).log(Level.SEVERE, null, ex);
      } catch (IOException ex) {
          Logger.getLogger(Lexique.class.getName()).log(Level.SEVERE, null, ex);
      } finally {
          if(r!=null) r.close();
      }
  </code></pre>
  
  <p>This time, we never enter the while, because r.hasNextLine() always returns "false". Any idea about what I'm doing wrong ?</p>
  
  <p>I precise that nothing else changed, the file is still the same.</p>
  
  <p><b>EDIT</b> : I also precise that I tried with another file and got the same result, meaning it doesn't comes from the file apparently.</p>
  
  <p>The file looks like this :</p>
  
  <pre><code>a
  à
  abaissa
  abaissable
  abaissables
  abaissai
  abaissaient
  abaissais
  abaissait
  ...
  </code></pre>
  
  <p><b>Edit 2 :</b>
  The content of the file seems to be problematic since the problem persists only if I copy/paste the content from my file to another. In clear, if I write the content myself, it works, if I use a part of the content of my dico.txt file, it doesn't work. Any explanation ?</p>
  
  <p><b>Edit 3 :</b>
  These are the links to my files. I advice you to avoid the dico.txt which is very huge.</p>
  
  <p>dico.txt : <a href="https://drive.google.com/file/d/0B0sroFy9HZlBNDl3MUwzVnh6VU0/edit?usp=sharing" rel="noreferrer">https://drive.google.com/file/d/0B0sroFy9HZlBNDl3MUwzVnh6VU0/edit?usp=sharing</a></p>
  
  <p>test.txt : <a href="https://drive.google.com/file/d/0B0sroFy9HZlBemZjbXU1RmlmdjQ/edit?usp=sharing" rel="noreferrer">https://drive.google.com/file/d/0B0sroFy9HZlBemZjbXU1RmlmdjQ/edit?usp=sharing</a></p>