title: Cyrillic encoding output in R
body: <p>Encoding is always a pain for me, and again it's impossible to write file with russian text. 
  What should I do for this? </p>
  
  <pre><code> &gt;test = c("привет","пока")
   &gt;test
   [1] "\320\277\321\200\320\270\320\262\320\265\321\202" "\320\277\320\276\320\272\320\260"
  
   &gt;Encoding(test)
   [1] "unknown" "unknown"
  
   &gt; f = file("test.txt", encoding = "UTF-8")
  
   &gt; write(t,f)
   Error in cat(list(...), file, sep, fill, labels, append) : 
   argument 1 (type 'closure') cannot be handled by 'cat'
  
   &gt; Encoding(test) = "UTF-8"
   &gt; test
   [1] "&lt;U+043F&gt;&lt;U+0440&gt;&lt;U+0438&gt;&lt;U+0432&gt;&lt;U+0435&gt;&lt;U+0442&gt;" "&lt;U+043F&gt;&lt;U+043E&gt;&lt;U+043A&gt;&lt;U+0430&gt;"  
  
   &gt; write(t,f)
   Error in cat(list(...), file, sep, fill, labels, append) : 
   argument 1 (type 'closure') cannot be handled by 'cat'  
  </code></pre>
  
  <p>I use R-studio 0.97.312, Mac OS 10.7.5, </p>