I have a vector coming from an external database that had a problem with encoding, resulting in a character vector with many occurrences of &XXX
.
This looks like HTML encoding of accented letters.
Is there a function that can convert this to a readable vector?
Obviously, iconv()
is not working as the very encoding seems right. Encoding(x)
returns unknown
though.
Here is a little reprex with the expected output:
x="H&eacutemipl&eacutegie"
iconv(x, from="latin1", to="utf8") #no effect
"Hémiplégie" #expected outcome