RStudio is not interpreting correctly some symbols

I´m having some problems with R interpretation of symbols.

For example, when typing the code to write down the backslash, it writes down the Yen symbol.
Or when trying to write the script: ´, as in you´re, the writing bar moves one symbol to the right, as in the image that I attach.


Has something to do with ascII or character encoding? Any help would be appreciated.

Try copy pasting this: '
What OS or distro are you using? It could be your keyboard settings.

What for? Copy pasted as it is.
I´m using Windows 10.

what version of RStudio are you using please ?

What you posted looks like a tilde, not an apostrophe. Let me know if copy pasting the apostrophe fixes it.

Are you using any other languages on Windows? Perhaps installed R Studio in another language?

1 Like

Is it giving two different versions?


"R version 4.1.0 (2021-05-18)"

If I check in About RStudio:

Version 1.4.1717

Anyhow, I´m using both latest versions of R and RStudio

Hi, I now understand your message. The apostrophe fixes it, but because I think it´s a tilde not an apostrophe. When I try to copy paste a backslash the symbol that appears is the Yen symbol, so it probably has something to do with Rstudio interpreter, as it doesn´t happen with RGui.

Try Sys.setlocale("LC_TIME") command, see what it outputs. Though not the exact command needed, I think it might help identify certain details of your problem.

Also try going to control panel keyboard settings, and try to change it US keyboard appropriate for your region. For example, for me, I chose US keyboard with euro on 5.

1 Like

I have a spanish keyboard and laptop:

Sys.setlocale("LC_TIME") gives me

Also sessionInfo:

R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

[1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252    LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C                  
[5] LC_TIME=Spanish_Spain.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] kableExtra_1.3.4

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13   knitr_1.33        xml2_1.3.2        magrittr_2.0.1    rvest_1.0.0       munsell_0.5.0    
 [7] colorspace_2.0-1  viridisLite_0.4.0 R6_2.5.0          rlang_0.4.11      stringr_1.4.0     httr_1.4.2       
[13] tools_4.1.0       webshot_0.5.2     xfun_0.23         htmltools_0.5.1.1 systemfonts_1.0.2 yaml_2.2.1       
[19] digest_0.6.27     lifecycle_1.0.0   glue_1.4.2        evaluate_0.14     rmarkdown_2.9     stringi_1.6.2    
[25] compiler_4.1.0    scales_1.1.1      svglite_2.0.0   

Hmm definitely strange that yen/yuan symbol pops up. I'm not sure what's happening there.

But yeah, try adding the US English keyboard with euro on 5 and switch to the US English keyboard by pressing left alt + left shift. See if yen/yuan symbol keeps popping up.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.