[R] [Encoding] When R reads a csv file, the Chinese is displayed as garbled

1. Problem When
reading a UTF-8 encoded csv file, the Chinese is displayed as garbled characters.
2. Solution
Correct: text<-read.csv("C:/path/HW_data.csv", header = F, encoding ='UTF-8')
error: text<-read.csv("C:/path/ HW_data.csv", header = F, fileEncoding ='UTF-8')
error: text<-read.csv("C:/path/HW_data.csv", header = F, encoding ='utf-8')

Guess you like

Origin blog.csdn.net/why_not_study/article/details/100919737