How to import data with Chinese Characters correctly in R

1k Views Asked by At

Here is the link to the file I am having trouble with. https://www.dropbox.com/s/m7dllf3ec884mte/help.csv?dl=0

I am using RStudio with R 3.1.2 installed. My problem is that when using read.csv to import this file, the Chinese character within the file turn out to be some gibberish. Could someone help me with this, I would be much appreciated.

I have tried to change my locale using Sys.setlocale(category = "LC_ALL", locale = "chs"). It didn't work. I have also tried to change the encoding of the file using data <-read.csv("help.csv", encoding="UTF-8", stringsAsFactors=FALSE), it didn't work either. All it does was changing to another kind of random characters instead of proper Chinese character.

There is no problem with my RStudio console when just typing in Chinese characters.

0

There are 0 best solutions below