1
Hello I am using R together with Quanteda to survey KWIC in a corpus of the agency Lupa. I have problems with the characters.
I import the corpus as follows:
corpus.fake.df <- readtext("../dados/analise/*.txt",
docvarsfrom = "filenames",
encoding = "UTF-8")
fake.corpus <- corpus(corpus.fake.df)
After this done, I run a kwic with a term:
k <- kwic(fake.tokens , "gomes", 5, case_insensitive=TRUE, encTo = "UTF-8", valuetype = "regex")
When asking to view the data, instead of calling the Rstudio viewer, what I have is a browser window with all the wrong characters:
Thank you very much!
the problem is in the
corpus.fake.df
and not in functionkwid
. See https://answall.com/questions/6805/howto avoid-problems-de-encoding-quando-pegadados-com-twitter,– Guilherme Parreira
Thanks for the answer!. I could not, tried and gave the same problem
– user135517
Have you tried
encTo='windows1252'
orencTo="latin1"
?– JdeMello
Yes, unfortunately it didn’t work
– user135517