title: Invalid characters while reading content of text file to String
body: <p>This is my code:</p>
  
  <pre><code>    StringBuffer fileData = new StringBuffer(1000);
      BufferedReader reader = new BufferedReader(new FileReader(file));
      char[] buf = new char[5000];
      int numRead=0;
      while((numRead=reader.read(buf)) != -1){
          String readData = String.valueOf(buf, 0, numRead);
          fileData.append(readData);
          buf = new char[1024];
      }
      reader.close();
      return fileData.toString();
  </code></pre>
  
  <p>When I run it in windows, everything is fine.</p>
  
  <p>But when I run in UNIX in the beginning of the string I see:</p>
  
  <blockquote>
    <p>ï»¿</p>
  </blockquote>
  
  <p>What can be the issue?</p>