Emoji problem : replace_emoji function problem

I don't know where your source text came from but using another syntax for your UTF8 char it works

text="C'est juste enorme ce son \U0001F44C\U0001F44C>"
textclean::replace_emoji(text)
#> [1] "C'est juste enorme ce son OK hand OK hand >"

# You could convert from the <U+ > form
text2 <- "C'est juste enorme ce son <U+0001F44C><U+0001F44C>"
text2 <- gsub("<U\\+([A-Z0-9]+)>", "\\\\U\\1", text2)
textclean::replace_emoji(stringi::stri_unescape_unicode(text2))
#> [1] "C'est juste enorme ce son OK hand OK hand "

Created on 2020-04-11 by the reprex package (v0.3.0.9001)

Hope it helps

1 Like