ripley@stats.ox.ac.uk
1999-Sep-28 14:44 UTC
Collating sequences are used inconsistently. (PR#289)
R 0.65.0 (and all others I have seen), Solaris 2.6.> sort(c("a", "A", "b", "B"))[1] "A" "a" "B" "b"> "a" < "B"[1] FALSE in the en_UK locale. I don't think it is good idea that sort and < have a different idea of ordering, so I rate this as a bug. As far as I can see sort uses strcoll and hence the locale, and < uses ASCII. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
1999-Sep-28 15:13 UTC
Collating sequences are used inconsistently. (PR#289)
ripley@stats.ox.ac.uk writes:> R 0.65.0 (and all others I have seen), Solaris 2.6. > > > sort(c("a", "A", "b", "B")) > [1] "A" "a" "B" "b" > > "a" < "B" > [1] FALSE > > in the en_UK locale. I don't think it is good idea that sort and < > have a different idea of ordering, so I rate this as a bug. As far as I can > see sort uses strcoll and hence the locale, and < uses ASCII.Agreed. I did a i quick runover of all uses of strcmp in the code, and it seems that the sign only gets used in two files, relop.c (4 times) and in gnuwin32/dynload.c. The latter one is in a binary search of the symbol table, which I'll assume is in ASCII order... I'll make the changes to relop.c if you haven't done so already. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- (PR#8017) build of REventLoop package crashes with 2.1 due
- Psssst. The US is asleep - let's talk intern ationalization !!!
- build of REventLoop package crashes with 2.1 due tosyntax error in Defn.h (PR#8017)
- test fails when requesting LC_CTYPE
- Latest R-devel build failing on OS X