When running R inside rApache, the locale is inherited from the Apache webserver, and therefore Sys.getlocale() is always equal to \"C\". I would l
Sys.getlocale()
\"C\"
Try this:
Sys.setlocale(category = "LC_ALL", locale = "English_United States.1252")