Unicode's proper level of abstraction? [was: Re: VLERange:...]

Michel Fortin michel.fortin at michelf.com
Thu Jan 13 16:37:10 PST 2011


On 2011-01-13 14:11:44 -0500, spir <denis.spir at gmail.com> said:

> In Cocoa, string sorting and case-insensitive comparition is also 
> dependent on the user's locale settings, although you can also specify 
> your own locale if the user's locale is not what you want. See kde 
> trying to invent a, hum, "natural", way of sorting file names...)

Mac OS sorts file names in a "natural" way since a very long time 
(since Mac OS 8 I believe). By natural, I mean that numbers inside the 
file name are sorted in numeric order while the rest is sorted 
character by character. For instance "My File 2" will go before "My 
File 10" in file listings because "2" is less than "10".

There's an option in NSString comparison methods to use this ordering, 
but it's not the default.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list