user17241
user17241

Reputation: 317

Character accented with R

I am treating text with R (text classification) and I have a problem with some words in a french text , like for exemple this :

Charg\u00e9 d'\u00e9tude

How Can I do to resolve this problem?

Thank you

Upvotes: 0

Views: 334

Answers (1)

JMenezes
JMenezes

Reputation: 1059

I got the method from this answer:"Print unicode character string in R". It looks like R is supposed to handle accents but maybe something is missing on the original file, and R is not recognizing the text as Unicode.

 library(stringi)
 stri_unescape_unicode("Charg\u00e9 d'\u00e9tude")
[1] "Chargé d'étude"

Upvotes: 1

Related Questions