Search code examples
rdataframeread.csvfarsi

read a *.CSV file with Persian(farsi) column in R


I am trying to read an excel file that has some companies data in R, companies names are in persian but when I read the files into R, the companies names don't readable, I'm trying this code to read my data

read.csv("book.csv",encoding = "UTF-8")

this is how companies names were shown


Solution

  • I finally found the answer. By setting the system locale as persian one can add persian columns into R.

    Sys.setlocale(locale = "persian")**