title: Error in nchar(Terms(x), type = "chars") : invalid multibyte string, element 204, when inspecting document term matrix
body: <p>Here is the source code that I have used:  </p>
  
  <pre><code> MyData &lt;- Corpus(DirSource("F:/Data/CSV/Data"),readerControl = list(reader=readPlain,language="cn"))
      SegmentedData &lt;- lapply(MyData, function(x) unlist(segmentCN(x)))
      temp &lt;- Corpus(DataframeSource(SegmentedData), readerControl = list(reader=readPlain, language="cn"))
  </code></pre>
  
  <h3>Preprocessing Data</h3>
  
  <pre><code>temp &lt;- tm_map(temp, removePunctuation)
  temp &lt;- tm_map(temp,removeNumbers)
  removeURL &lt;- function(x)gsub("http[[:alnum:]]*"," ",x)
  temp &lt;- tm_map(temp, removeURL)
  temp &lt;- tm_map(temp,stripWhitespace)
  dtmxi &lt;- DocumentTermMatrix(temp)
  dtmxi &lt;- removeSparseTerms(dtmxi,0.83)
  
  **inspect(t(dtmxi))** ---This is where I get the error
  </code></pre>