title: How to do encoding in R and why â€™ comes instead of apostrophe(')s and how to resolve it
body: <p>Hi I am trying to do text mining in <strong>R version 3.4.2</strong>
  I am trying to import .txt files from local drive using <code>VCorpus</code> command. 
  But after Run following code</p>
  
  <pre><code>cname &lt;- file.path("C:", "texts")  
  cname  
  dir(cname) 
  library(readr)
  library(tm)
  docs &lt;- VCorpus(DirSource(cname))   
  summary(docs)
  inspect(docs[1])
  writeLines(as.character(docs[1]))
  </code></pre>
  
  <p>Output:
  Well, the election, it came out really well. Next time we**â€™**ll triple the number and so on</p>
  
  <p>â€™ its originally aporstophe(')s now how can i convert or get original text in <strong>Rstudio</strong>?</p>
  
  <p>Please it will appreciate if someone help me 
  Thanks in Advance</p>