R – handling special characters e.g. accents in R


I am doing some web scraping of names into a dataframe

For a name such as "Tomáš Rosický, I get a result "Tomáš Rosický"

I tried

Encoding("Tomáš Rosický") #  with latin1 response

but was not sure where to go from there to get the original name with accents back. Played around with iconv without success

I would be satisfied (and might even prefer) an output of "Tomas Rosicky"

Best Solution

You've read in a page encoded in UTF-8. if x is your column of names, use Encoding(x) <- "UTF-8".