How do you use special letters (Danish) in R-studio?

I am from Denmark and should be able to use Danish letters in my R code.

If I add code like:

print("Århus er bare øv...")

and save it as an R-script file in R-studio, the next time I open the file in R-studio I get:

print("?rhus er bare ?v...")
+4
source share
1 answer

When saving a file, use File → Save with encoding and select, for example. UTF-8. If the next time the file is not read correctly, use File -> Reopen with encoding.

You can also change RStudio settings (Tools → Global Options / General → Text Encoding by default) and set "UTF-8".

+2
source

Source: https://habr.com/ru/post/1538826/


All Articles