title: Why is this Java encoding UTF-8 --> Latin1 wrong?
body: <p>I want to download <a href="https://www.wikiaves.com.br/wiki/frango-d_agua-menor" rel="nofollow noreferrer">this</a> UTF-8 file and convert it to Latin1 in Java (Android). At line 443, <code>Frango-dâ~@~YÃ¡gua-menor</code> is translated to <code>Frango-d?água-menor</code> instead of <code>Frango-d'água-menor</code>. Same in line 465, where <code>DescriÃ§Ã£o fÃ­sicaâ~@¦</code> is translated to <code>Descrição física?</code>, with that pesky <code>?</code> at the end.</p>
  
  <p>It seems this file is not a valid <code>UTF-8</code>? But <code>iconv -f utf-8 -t iso-8859-1//TRANSLIT</code> on this file works just fine.</p>
  
  <p>This is the code I use to download (downloaded file is in <code>infofile</code>):</p>
  
  <pre><code>                fos = new FileOutputStream(infotxt);
                  out = new OutputStreamWriter(fos, 'Latin1');
                  fis = new FileInputStream(infofile);
                  br = new BufferedReader(new InputStreamReader(fis));
                  while ((line = br.readLine()) != null) {
                      out.write("\n"+line.trim());
                  }
                  br.close();
                  out.close();
                  fis.close();
                  fos.close();
  </code></pre>