[R] R in Linux: problem with special characters
Duncan Murdoch
murdoch.duncan at gmail.com
Fri Jun 11 23:54:34 CEST 2010
daniel fernandes wrote:
>
>
>
> Hi,
>
> I’m working with the 64 bit version of R 2.11.0 for Linux. My session info is:
>
> R version 2.11.0 (2010-04-22)
> x86_64-redhat-linux-gnu
>
> locale:
> [1] C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
>
> When I try to print words with special characters the result is that the expression printed has some kind of code substituting the special character. For example, if I run print(“dúvida”) the result is:
>
> > print("dúvida")
> [1] "d\372vida"
>
> This as problem has something to do with the locale settings? If I run the locale command in the Linux server, I get:
>
Yes, it's your locale settings. The C locale doesn't support the "ú"
character in your string, and displays it in octal.
Duncan Murdoch
>
> [daniel.fernandes at pt-lnx13 ~]$ locale
> LANG=pt_PT.UTF-8
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_PAPER="C"
> LC_NAME="C"
> LC_ADDRESS="C"
> LC_TELEPHONE="C"
> LC_MEASUREMENT="C"
> LC_IDENTIFICATION="C"
> LC_ALL=C
>
> Thanks in advance for your help,
>
> Daniel
>
>
>
> TRANSFORME SUAS FOTOS EM EMOTICONS PARA O MESSENGER. CLIQUE AQUI E VEJA COMO.
> _________________________________________________________________
> VEJA SEUS EMAILS ONDE QUER QUE VOCÊ ESTEJA, ACESSE O HOTMAIL PELO SEU CELULAR AGORA.
>
> =Live_Hotmail&utm_medium=Tagline&utm_content=VEJASEUSEM84&utm_campaign=MobileServices
> [[alternative HTML version deleted]]
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>
More information about the R-help
mailing list