title: Apply Encoding to Entire Data.Table
body: <p>I have the following file read into a data.table like so:</p>
  
  <pre><code>raw &lt;- fread("avito_train.tsv", nrows=1000)
  </code></pre>
  
  <p>Then, if I change the encoding of a particular column and row like this:</p>
  
  <pre><code>Encoding(raw$title[2]) &lt;- "UTF-8"
  </code></pre>
  
  <p>It works perfectly.</p>
  
  <p>But, how can I apply the encoding to all columns, and all rows?</p>
  
  <p>I checked the <code>fread</code> documentation but there doesn't appear to be any encoding option.  Also, I tried <code>Encoding(raw)</code> but that gives me an error (a character vector argument expected).</p>
  
  <p><strong>Edit:</strong> This article details more information on foreign text in RStudio on Windows <a href="http://quantifyingmemory.blogspot.com/2013/01/r-and-foreign-characters.html" rel="nofollow">http://quantifyingmemory.blogspot.com/2013/01/r-and-foreign-characters.html</a></p>