title: R Corpus Is Messing Up My UTF-8 Encoded Text
body: <p>I am simply trying to create a corpus from Russian, UTF-8 encoded text.  The problem is, the Corpus method from the <code>tm</code> package is not encoding the strings correctly.</p>
  
  <p>Here is a reproducible example of my problem:</p>
  
  <p><strong>Load in the Russian text:</strong></p>
  
  <pre><code>&gt; data &lt;- c("Renault Logan, 2005","Складское помещение, 345 м²",
            "Су-шеф","3-к квартира, 64 м², 3/5 эт.","Samsung galaxy S4 mini GT-I9190 (чёрный)")
  </code></pre>
  
  <p><strong>Create a VectorSource:</strong></p>
  
  <pre><code>&gt; vs &lt;- VectorSource(data)
  &gt; vs # outputs correctly
  </code></pre>
  
  <p><strong>Then, create the corpus:</strong></p>
  
  <pre><code>&gt; corp &lt;- Corpus(vs)
  &gt; inspect(corp) # output is not encoded properly
  </code></pre>
  
  <p>The output that I get is:</p>
  
  <pre><code>&gt; inspect(corp)
  &lt;&lt;VCorpus (documents: 5, metadata (corpus/indexed): 0/0)&gt;&gt;
  
  [[1]]
  &lt;&lt;PlainTextDocument (metadata: 7)&gt;&gt;
  Renault Logan, 2005
  
  [[2]]
  &lt;&lt;PlainTextDocument (metadata: 7)&gt;&gt;
  Ñêëàäñêîå ïîìåùåíèå, 345 ì&lt;U+00B2&gt;
  
  [[3]]
  &lt;&lt;PlainTextDocument (metadata: 7)&gt;&gt;
  Ñó-øåô
  
  [[4]]
  &lt;&lt;PlainTextDocument (metadata: 7)&gt;&gt;
  3-ê êâàðòèðà, 64 ì&lt;U+00B2&gt;, 3/5 ýò.
  
  [[5]]
  &lt;&lt;PlainTextDocument (metadata: 7)&gt;&gt;
  Samsung galaxy S4 mini GT-I9190 (÷¸ðíûé)
  </code></pre>
  
  <p><strong>Why does it output incorrectly?</strong>  There doesn't seem to be any option to set the encoding on the Corpus method.  Is there a way to set it after the fact?  I have tried this:</p>
  
  <pre><code>&gt; title_corpus &lt;- tm_map(title_corpus, enc2utf8)
  Error in FUN(X[[1L]], ...) : argumemt is not a character vector
  </code></pre>
  
  <p>But, it errors as shown.</p>