From tlumley at u.washington.edu  Fri Mar 17 22:32:32 2006
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Fri, 17 Mar 2006 13:32:32 -0800 (PST)
Subject: [Rd] collation order
Message-ID: <Pine.LNX.4.64.0603171320170.12181@homer22.u.washington.edu>


The following caused a hard-to-diagnose problem for a user of the survey 
package.  Presumably this is a strange Unicode thing, but is there a 
convenient reference for how the collation order is determined? I am 
surprised that adding the same character to the end of two strings of the 
same length can change the sorting order.

in en_US.utf8 locale
> "1//"<"10/"
[1] TRUE
> "1//2"<"10/2"
[1] FALSE

in C locale on the same system.
> "1//"<"10/"
[1] TRUE
> "1//2"<"10/2"
[1] TRUE

[This is in r-devel of March 6, but the problem that was reported to me 
involved Windows vs Linux on released versions]

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



[Rd] collation order
Thomas Lumley