Mysterious locale behavior under OS X turned out to be caused by dock-launched apps not having LANG/LC_* set. We set this explicitly now. R.app has a couple of prefs that override this behavior, according to the Mac OS X R FAQ. Not sure why those are needed; may warrant further investigation.
…r code folding