Reputation: 1355
I have received some data that contains some Russian characters and has been converted to some encodings like
<U+041D>
Is there a function to convert these back to UTF-8 so that they will display the characters correctly again?
Upvotes: 0
Views: 70
Reputation: 54237
Try
as.character(parse(text = shQuote(gsub("<U\\+([A-Z0-9]+)>", "\\\\u\\1", "Bl<U+041D>"))))
# [1] "BlН"
Upvotes: 1