I have a text that is written with the old version of romanian letters.
Old | New |
---|---|
ş (s with a cedilla) UTF-8: c59f |
ș (s with a comma) UTF-8: c899 |
ţ (s with a cedilla) UTF-8: c5a3 |
ț (t with a comma) UTF-8: c89b |
When I export the text from R into a text file, this causes problems (this special letters are exported as s and t). I've manually changed some of the letters, and there where exported correctly.
How can I replace in R the old and new versions of these letters?
So far I have tried:
x<-"ş__s"
gsub("ş","ș",x) # this replaces the letter s also (output: s__s)
gsub("\xc5\x9f","\xc8\x99",x) # this does nothing
gsub("c59f","c899",x) # this does nothing
I hope this is explained clear enough. Thank you in advance for your responses.