I use R (v3.5.1) on Windows 10. And there is a .Rprofile
file in my working directory. The file contains non-ASCII letters but is saved with UTF-8 encoding. At the startup, the encoding of non-ASCII letters is distorted. For example the code:
nth <- Sys.setlocale(locale = "Lithuanian")
print("Ą Ę Ė Į Š Č Ų")
if run at the startup results in:
[1] "Ä„ Ä\230 Ä– Ä® Å Ä\214 Ų"
My questions are:
- Is it possible to configure R that it sources
.Rprofile
with UTF-8 encoding at the startup? - Is there another way to get non-ASCII letters encoded correctly at the startup?