[R-SIG-Mac] bug: locale not detected by R.app 2.7.2 ?
Hugo Quené
hugo.quene at let.uu.nl
Tue Oct 7 23:26:49 CEST 2008
Dear Developers,
After upgrading from R 2.6.2 to 2.7.2 on my MacBook I've run into an
annoying little problem (warning). It seems that the R.app interface
does not detect the proper system locale (international) settings,
whereas R in shell mode has no such problem, see the logs below.
This is irritating because I'm working with strings containing
non-ASCII characters.
1. Here's a log of R.app Console window:
<BEGIN R.app log>
R version 2.7.2 (2008-08-25)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_COLLATE failed, using "C"
3: Setting LC_TIME failed, using "C"
4: Setting LC_MESSAGES failed, using "C"
WARNING: You're using a non-UTF8 locale, therefore only ASCII
characters will work.
Please read R for Mac OS X FAQ (see Help) section 9 and adjust your
system preferences accordingly.
[Workspace restored from /Users/Hugo/.RData]
> sessionInfo()
R version 2.7.2 (2008-08-25)
i386-apple-darwin8.11.1
locale:
C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Making links in per-session dir ... done
> system("echo $LC_CTYPE")
> system("echo $LC_COLLATE")
> system("echo $LC_TIME")
> system("echo $LC_MESSAGES")
> Sys.getlocale()
[1] "C"
<END R.app log>
2. Here's a log from R called from within a shell (Terminal):
<BEGIN R shell log>
Unknown-00-1e-52-82-78-89:~ Hugo$ R
R version 2.7.2 (2008-08-25)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> system("echo $LC_CTYPE")
UTF-8
> Sys.getlocale()
[1] "C/UTF-8/C/C/C/C"
>
<END R shell log>
3. Settings
I've read the R for Mac OS X FAQ (see Help) section 9.
My settings are customized, i.e. a mix of US and European
conventions for Language and Format. Hence I'm not strictly
following one country setting. Nor do I want to.
I'm using UTF-8 systemwide however.
Unknown-00-1e-52-82-78-89:~ Hugo$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.5
BuildVersion: 9F33
In the above cases R was run from my user home directory ~.
If you can provide some insights about the cause of this problem,
and possible remedies, I'd be delighted to hear!
Many thanks for your assistance, with kind regards,
Hugo Quené
--
Dr Hugo Quené | senior docent-onderzoeker Fonetiek | Departement
Moderne Talen | Utrecht inst of Linguistics OTS | Universiteit
Utrecht | Trans 10 | kamer 1.17 | 3512 JK Utrecht | The Netherlands
| T +31 30 253 6070 | F +31 30 253 6000 | hugo.quene at let.uu.nl |
www.hugoquene.nl | www.hum.uu.nl
More information about the R-SIG-Mac
mailing list