read.csv2 - Portuguese Encoding Problem

I have a problem when I import a file with strings in Portuguese using read.csv2

For example it shows "ç" instead of "ç".

I tried with encodings "UTF-8"," ISO-8859-1" and "Latin1" but it is not working, any idea why?

Thank you very much in advance

Remember put a reproducible example of data, maybe the csv file in a drive link for better help of all community.

Try with something like this:

  data<- read.csv("path_yourfile.csv", header = TRUE, sep = "," , dec = ".",
                         filled =TRUE, comment.char = "", strip.white = TRUE,
                         stringsAsFactors = TRUE, encoding="UTF-8")
1 Like

the encoding should be written in upper case:

encoding = "UTF-8"