title: How to keep UTF -8 encoding when using read csv in R?
body: <p>I encountered a problem of lossing file encoding UTF - 8 when using </p>
  
  <pre><code>read.csv
  </code></pre>
  
  <p>in R. That resulted in e.g. Latin letters replaced by not desired signs, e.g.:  IguaÃ§u.</p>
  
  <p>I tried using following with FileEncoding argument:</p>
  
  <pre><code>read.csv(xx.csv, fileEncoding = 'UTF-8')
  read.csv2(xx.csv, fileEncoding = 'UTF-8')
  </code></pre>
  
  <p>but got error:</p>
  
  <pre><code>Warning messages:1: In read.table(file = file, header = header, sep = sep, quote = quote,  :
    invalid input found on input connection 'C:/xxx.csv'
  2: In read.table(file = file, header = header, sep = sep, quote = quote,  :
    incomplete final line found by readTableHeader on 'C:/xxx.csv'
  </code></pre>
  
  <p>What is the solution to keep the UTF-8 encoding when reading csv into R?</p>