I have vector with names of countries such as x
x <- c("c\u00f4te", "côte")
showNonASCII(x)
1: c<c3><b4>te
2: c<f4>te
iconv(x, to="ASCII//TRANSLIT")
[1] "cA?te" "cote"
Encoding(x)
[1] "UTF-8" "latin1"
I would like to unify them, so how can I use str_replace to convert \u00f4 to ô. and convert x elements to latin1?