Reputation: 1698
When doing some textual data cleaning in R, I can found some special characters. In order to get rid of them, I have to know their unicodes, for example € is \u20AC. I would like to know if it is possible "see" the unicodes with a function that take into account the string within the special character as an input?
Upvotes: 2
Views: 4507
Reputation:
Refering to Cath comment, iconv
can do the job :
iconv("é", toRaw = TRUE)
Then, you may want to unlist
and paste with \u00
.
Upvotes: 1
Reputation: 127
special_char <- "%"
Unicode::as.u_char(utf8ToInt(special_char))
Upvotes: 1