title: Reading 0x1a Unicode in R using read.csv
body: <p>I have a CSV file that I read with <code>read.csv</code> in R. Unfortunately, I cannot use anything other than the base R package. </p>
  
  <p>I get the following error: </p>
  
  <pre><code>Warning message:
  In scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
    EOF within quoted string
  </code></pre>
  
  <p>The character where it chokes is <code>0x1a</code>(<a href="https://numbermonk.com/hexadecimal/26/en" rel="nofollow noreferrer">https://numbermonk.com/hexadecimal/26/en</a>). I tried the following as argument in <code>read.csv</code>: </p>
  
  <ul>
  <li><code>encoding="UTF-8"</code></li>
  <li><code>fileEncoding="UTF-8"</code></li>
  <li><code>quote="</code></li>
  </ul>
  
  <p>But I always have that same error. The result is that <code>read.csv</code> only reads the rows until it fails. </p>
  
  <p>Here's the example of where this happens: </p>
  
  <pre><code>as of 0430 10&lt;0x1a&gt;9-18 shaft on this happens
  </code></pre>
  
  <p>Any ideas on how to make R read this character? </p>
  
  <p>I must add that when I read it in <code>fread</code> everything is read just fine. But unfortunately, I cannot use <code>fread</code> as it is not part of the base R. </p>