From p.dalgaard@biostat.ku.dk  Tue Sep 28 16:13:17 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 28 Sep 1999 17:13:17 +0200
Subject: Collating sequences are used inconsistently. (PR#289)
In-Reply-To: ripley@stats.ox.ac.uk's message of "Tue, 28 Sep 1999 16:44:52 +0200 (MET DST)"
References: <199909281444.QAA14157@pubhealth.ku.dk>
Message-ID: <x2905rt6gi.fsf@blueberry.kubism.ku.dk>

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Collating sequences are used inconsistently. (PR#289)
Peter Dalgaard BSA