0

I have really strange problem. I am using Lithuanian keyboard, but R doesn't recognize letters such as į, š, č.

For example when I write:

žodis <- "žibutė"

in R console I see

þodis <- "þibutë".

I have R in several computers, all work fine except this one. Can you help me with this issue? Is any function to let R know that I'm using Lithuanian keyboard? My computer's operating system is Windows 10 and R version 3.3.2.

neringab
  • 613
  • 1
  • 7
  • 16
  • Look at the output if `sessionInfo()`, specifically the locales that are in use. Compare them across the computer that works and those that do not. I'm guessing that's the difference. Does typing work in other programs on this computer? – MrFlick Feb 28 '17 at 18:50
  • Yes, `sessionInfo()` differs. In this computer locale is `English United_States` and in other `Lithuanian Lithuania`. – neringab Feb 28 '17 at 18:54
  • 1
    I added `Sys.setlocale("LC_ALL","Lithuanian")`. Now everything works fine! Thank you, @MrFlick. ^^ – neringab Feb 28 '17 at 19:02
  • Feel free to add that as an answer below to mark the question as answered. – MrFlick Feb 28 '17 at 19:03
  • Maybe someone knows way, that I shouldn't rewrite `Sys.setlocale("LC_ALL","Lithuanian")` everytime I start new R session? All other things work fine.:)) – neringab Feb 28 '17 at 19:13
  • I think the value is inherited from the OS. So if you want to change the value of the OS, maybe try these steps: https://www.java.com/en/download/help/locale.xml (I know the page is for Java but the changes to the OS are not Java specific) – MrFlick Feb 28 '17 at 19:22
  • Applied and nothing... Problem still holds... – neringab Feb 28 '17 at 19:37
  • Did you restart R after changing the system setting? – MrFlick Feb 28 '17 at 19:37
  • Yes, computer restarted by itself – neringab Feb 28 '17 at 19:38
  • Ok, got it. When you want change locale into Lithuanian, you have to change date, time formats to Lithuanian, home locale to Lithuanian and, as you said, language for non-Unicode programs. Feel free to answer my question, i will vote it up. ^^ You helped me a lot! – neringab Feb 28 '17 at 19:53

0 Answers0