title: Android Reading File with Accents
body: <p>I have a problem. I am using a file to load some strings to use them in my App. </p>
  
  <p>I have this function:</p>
  
  <pre><code>    public void lecturaFichero(){
  
      String linea = null;
  
  
      try {
              InputStream in = cntx.getAssets().open("cc.txt");
  
              if (in != null) {
                  InputStreamReader input = new InputStreamReader(in,Charset.forName("iso-8859-1"));
                  BufferedReader buffreader = new BufferedReader(input);
  
                  while ((linea = buffreader.readLine()) != null) {
                      rellenaCodigo(linea);
                  }
                  in.close();
              }
      } catch (IOException e) {
       e.printStackTrace();
      }
  
  
  }
  </code></pre>
  
  <p>The problem is that when I run the app it crashes right away (reading the file is the first thing I do). </p>
  
  <p>If I do this instead of the above:</p>
  
  <pre><code>InputStreamReader input = new InputStreamReader(in)); //Without specifying the charset
  </code></pre>
  
  <p>It does work, it does not crash but the app shows  where that special characters should be.</p>
  
  <p>I need to solve this, I'd appreciate a solution in which I can read special characters in my app.</p>
  
  <p>Thanks in advance.</p>
  
  <p>PS: Android can print special characters because when I type a String by hand and print it on the screen it shows the character, the problem is when it comes to reading from the .txt.</p>