title: Java - Apostrophe error when reading words from text file into an array
body: <p>I am using the following method to read words in a .txt file into an array.</p>
  
  <pre><code>import java.io.BufferedReader;
  import java.io.FileReader;
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;
  
  public class FileArrayProvider {
  
  public String[] readLines(String filename) throws IOException {
      FileReader fileReader = new FileReader(filename);
      BufferedReader bufferedReader = new BufferedReader(fileReader);
      List&lt;String&gt; lines = new ArrayList&lt;String&gt;();
      String line = null;
      while ((line = bufferedReader.readLine()) != null) {
          lines.add(line);
      }
      bufferedReader.close();
      return lines.toArray(new String[lines.size()]);
  }
  }
  </code></pre>
  
  <p>The first word in my .txt file is "can't". However when I call this method and print the first word in the returned array, i get <code>can?t</code>. All the apostrophes in the words in the array are being replaced by <code>?</code>. How can I fix this??</p>