loading a bunch of documents using tm Corpus i need to specify encoding.
All documents are UTF-8 encoded. If openend via text editor content is ok but corpus contents is full of strange symbols (indicioâ., ‘sœs....) Source text is in spanish. ES_es
library(tm)
cname <- file.path("C:", "Users", "john", "Documents", "texts")
docs <- Corpus(DirSource(cname), encoding ="UTF-8")
> Error in Corpus(DirSource(cname), encoding = "UTF-8") :
unused argument (encoding = "UTF-8")
EDITED:
Getting str(documents[1]) from corpus I've noticed:
.. ..$ language : chr "en"
How can I specify, for instance "UTF-8", "Latin1" or any other encoding to avoid strange symbols?
Regards