Microsoft Windows XP does a pretty good job of natural sort order. For example a file called "File99" will sort just before "File100". "File99A" will slot between them, but "File992" will go after them. It's all pretty much exactly what you'd expect.


To sort "File10000" immediately after "FileFFFF" could be easily done using the a slightly modified form of same algorithm (maybe it would be a "tailored sort", I don't know), however the difficulty is in distinguishing the two meanings of 'F'. If it were clear that the first F was a letter and that the last four Fs were numeric digits with value fifteen, then such a sort would be a piece of cake to implement. So, the only important detail here is to distinguish number-F from letter-F. The rest is just an implementation problem.

Jill


> -----Original Message----- > From: Philippe Verdy [mailto:[EMAIL PROTECTED] > Sent: Monday, November 10, 2003 11:30 AM > To: Jill Ramonsky > Cc: [EMAIL PROTECTED] > Subject: Re: Hexadecimal digits? > > > In fact, the proposal suggests (prefers) exactly the > opposite: collating hex > digits with letters instead of just after digit 9. This is a > non-sense, and > this proposal is not for you if you want to implement natural sort... >




Reply via email to