[Rd] build package with unicode (farsi) strings

Hadley Wickham h@wickh@m @ending from gm@il@com
Fri Aug 31 00:18:17 CEST 2018


On Thu, Aug 30, 2018 at 2:11 AM Thierry Onkelinx
<thierry.onkelinx using inbo.be> wrote:
>
> Dear Farid,
>
> Try using the ASCII notation. letters_fa <- c("\u0627", "\u0641"). The full
> code table is available at https://www.utf8-chartable.de

It's a little easier to do this with code:

letters_fa <- c('الف','ب','پ','ت','ث','ج','چ','ح','خ','ر','ز','د')
writeLines(stringi::stri_escape_unicode(letters_fa))
#> \u0627\u0644\u0641
#> \u0628
#> \u067e
#> \u062a
#> \u062b
#> \u062c
#> \u0686
#> \u062d
#> \u062e
#> \u0631
#> \u0632
#> \u062f

Hadley

-- 
http://hadley.nz



More information about the R-devel mailing list