Question mark instead of letters

Hello,

I formatted my laptop and re-install R and Rstudio.

When I use "./ + Tab" To look for files in the directory,
Rstudio shows me questions ??? instead of Hebrew letters.
The view in the file pane is correct

I changed:
Sys.setlocale("LC_ALL", "Hebrew")
options(encoding ="UTF-8-BOM")
and also tools->code->saving->utf-8

Any other places where I can change the encodings?

Unless you're on Windows, or possibly macOS, default settings should work

string <- "סַבַּבָּה"
string
#> [1] "סַבַּבָּה"
sessionInfo()
#> R version 4.0.4 (2021-02-15)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Pop!_OS 20.10
#> 
#> Matrix products: default
#> BLAS:   /usr/local/lib/R/lib/libRblas.so
#> LAPACK: /usr/local/lib/R/lib/libRlapack.so
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] knitr_1.31        magrittr_2.0.1    debugme_1.1.0     rlang_0.4.10     
#>  [5] fansi_0.4.2       stringr_1.4.0     styler_1.3.2      highr_0.8        
#>  [9] tools_4.0.4       xfun_0.22         utf8_1.2.1        htmltools_0.5.1.1
#> [13] ellipsis_0.3.1    yaml_2.2.1        digest_0.6.27     tibble_3.1.0     
#> [17] lifecycle_1.0.0   crayon_1.4.1      purrr_0.3.4       vctrs_0.3.6      
#> [21] fs_1.5.0          glue_1.4.2        evaluate_0.14     rmarkdown_2.7    
#> [25] reprex_1.0.0      stringi_1.5.3     compiler_4.0.4    pillar_1.5.1     
#> [29] backports_1.2.1   pkgconfig_2.0.3

cool

Sababa, I approve your choice of word :smiley:

1 Like

Thank you for your help-
actually, I'm on Win 10

Here is my session info-

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Israel.1252  LC_CTYPE=English_Israel.1252   
[3] LC_MONETARY=English_Israel.1252 LC_NUMERIC=C                   
[5] LC_TIME=English_Israel.1252    

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

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3   

I was Able to find the problem, posting here as it might help others:
When I ran l10n_info() I saw that system.codepage=1252
As windows locale was English(US), change the locale to Israel(Hebrew) fixes the issue.
If you are concerned, Windows default language is still English

Here is how I changed the locale:

Control Panel -> Region -> Administrative -> Change System Locale" -> Hebrew(Israel)

1 Like

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.