[R-SIG-Mac] Bug related to locale changes.

MacQueen, Don macqueen1 at llnl.gov
Mon Jun 8 23:48:30 CEST 2015


Duncan,

Would you (or someone) be able to test if this fixes a problem I found on
Friday, that appeared shortly after I upgraded to 3.2.0 and reinstalled
all my packages?


--------------------- example ---------------------
[62]% R --vanilla

R version 3.2.0 (2015-04-16) -- "Full of Ingredients"

[... startup messages omitted ...]

tmp.locale <- Sys.setlocale('LC_ALL','en_US.UTF-8')
require(xlsx)
Loading required package: xlsx
Failed with error:  â


sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
--------------------- end of example ---------------------

Wheres if I load the package first, no problem.


I reported it to the maintainer (Adrian Dragulescu) at that time, and he
suggested that perhaps it was related. Earlier today I found the same
pattern with respect to the xtable package.

I apologize for not being in a position to do this test myself, but I'm
not set up to readily build R from source on the Mac.

Thanks
-Don


-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 6/8/15, 8:18 AM, "Duncan Murdoch" <murdoch.duncan at gmail.com> wrote:

>On 08/06/2015 9:18 AM, Duncan Murdoch wrote:
>> On 08/06/2015 8:55 AM, Simon Urbanek wrote:
>>> Interesting - it seems to fail only the first time after the locale is
>>>set:
>>>
>>>> Sys.setlocale(locale="en_CA")
>>> [1] "en_CA/en_CA/en_CA/C/en_CA/en_US.UTF-8"
>>>> "320" > "300"
>>> [1] NA
>>>> "320" > "300"
>>> [1] TRUE
>>>> "320" > "300"
>>> [1] TRUE
>>>
>>> There is probably an associated error. I'll have a look later today
>>>unless someone beats me to it.
>> 
>> I think I've got it, and should be able to commit a patch soon.
>
>Committed as of revision 68489.
>
>Duncan
>
>> 
>> Duncan
>> 
>>>
>>> Thanks,
>>> Simon
>>>
>>>
>>> On Jun 8, 2015, at 7:40 AM, Duncan Murdoch <murdoch.duncan at gmail.com>
>>>wrote:
>>>
>>>> I posted this to R-devel yesterday; from responses received, it
>>>>appears
>>>> to be OSX-specific (maybe Mavericks-specific).
>>>>
>>>> In an R session started from the terminal with R --vanilla, I see
>>>>this:
>>>>
>>>>> Sys.setlocale(locale="en_CA")
>>>> [1] "en_CA/en_CA/en_CA/C/en_CA/en_CA.UTF-8"
>>>>> "320" > "300"
>>>> [1] NA
>>>>> "320" > "300"
>>>> [1] TRUE
>>>>
>>>> The first string comparison after the locale change produces NA, while
>>>> later ones are fine.
>>>>
>>>> The locale string "en_CA" doesn't appear to matter, as long as it is
>>>> different from my previous locale.
>>>>
>>>> Do others see this?  Can we fix it before the 3.2.1 release?
>>>>
>>>> Duncan Murdoch
>>>>
>>>> _______________________________________________
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>
>>>
>>
>
>_______________________________________________
>R-SIG-Mac mailing list
>R-SIG-Mac at r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list