I have a character string in UTF-8, and need to 1) gsub
special symbols, 2) convert whole data frame to "normal" (ASCII?) encoding. However, I fail to run gsub
on it - doesn't catch the string.
I work in French
locale (tried UTF-8) but didn't get it granted.
Cannot give you the full dataset, but will post a couple strings from it here.
DataFrame = read.csv("SLD_products_FullData.csv",header=F,sep=",",encoding = "UTF-8")
title = DataFrame$title
This is how title looks like in console:
"Campbell’s Gravy and General Mills • Cheerios"
And in Viewer:
Campbell’s Gravy and General Mills • Cheerios"
Tried (with all kinds of perl, fixed, etc):
gsub("’","'",title)
gsub("•","-",title)
Even tried gsub("’","'",title)
. No luck.
Encoding(title)
[1] "UTF-8"
Any suggestions? Thanks!!