I search everywhere for an answer but could not find the right one. I need to convert a string to a specific encoding in R, but was not able to do so:
string <- "überhaupt"
What I need: "überhaupt"
to following functions I have used so far:
textutils::HTMLencode(string) gives: "überhaupt"
utf8::utf8_print(string, utf8 = F) gives: "\u00fcberhaupt"
iconv(string, from = "windows-1252", "utf-8") gives: "überhaupt"
It seems that I need the hex Numeric character reference https://en.wikipedia.org/wiki/%C3%9C but I don't know how to convert.
Thanks for your help