RStudio triggers wrong locale?

It seems starting R from Rstudio triggers different locale settings than when starting R from the RGui console. How to solve this?

In R-studio:

[1] "C"
> l10n_info()$codepage
[1] 0

Versus same calls from RGui (or R-term) R-console:

[1] "LC_COLLATE=Norwegian Bokmål_Norway.utf8;LC_CTYPE=Norwegian Bokmål_Norway.utf8;LC_MONETARY=Norwegian Bokmål_Norway.utf8;LC_NUMERIC=C;LC_TIME=Norwegian Bokmål_Norway.utf8"
[1] 65001

Typing nordic letters in R-studio console:

c("a", "æ", "ø", "å")
Error: unexpected symbol in "c("a", "�", "�", "�")"

Versus directly in Rgui (or R-term) console

c("a", "æ", "ø", "å")
[1] "a" "æ" "ø" "å"

R version 4.2.0 (2022-04-22 ucrt)
2022.02.2 Build 485
Windows 10

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.