0

I have a problem related to encoding.

Given a dataset like this

country     city
Ukraine     Kyiv правый
Costa Rica  San José

I'm converting it into csv this way:

write.csv(df, 'df.csv', fileEncoding = 'UTF-8', row.names = FALSE)

However, both when I'm exporting it to Google Sheets or when I'm reading it again in RStudio, it gives me the following output:

country    city
Ukraine    Kyiv <U+043F><U+0440><U+0430><U+0432><U+044B><U+0439>
Costa Rica San José

Is there a way to overcome this?

teogj
  • 289
  • 1
  • 11

0 Answers0