On Tue, 28 Jul 2020 10:31:07 +0430 Vahid Borji <vahid.borj...@gmail.com> wrote:
> A<-data.frame(x=c("مریم","ماریا"),y=c(1,1)) > The output is like this: > > x y1 > <U+0645><U+0631><U+06CC><U+0645> 12 > <U+0645><U+0627><U+0631><U+06CC><U+0627> 1 This is one of those problems heavily affected by your version of R (does it have stringsAsFactors = TRUE or FALSE by default?), your operating system and locale (see [*] for a description of Unicode-related problems in R on Windows). Here is a similar problem from 9 years ago where Unicode characters were displayed as escapes on Windows with US English (ANSI-1251) locale when data.frame() converted strings to factors: https://r.789695.n4.nabble.com/gsub-with-unicode-and-escape-character-td3672737.html -- Best regards, Ivan P.S. > [[alternative HTML version deleted]] Please post in plain text, not HTML. [*] https://developer.r-project.org/Blog/public/2020/05/02/utf-8-support-on-windows/index.html ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.