Natural Order is a System Extension that improves the sorting order that your Macintosh uses when it displays lists of items that have numbers in the name.
If you have a group of numbered files on your disk and you select "View By Name" in the Finder, you might expect the files to be displayed in sensible numerical order, like this:
Picture1.jpg Picture2.jpg Picture3.jpg Picture4.jpg Picture5.jpg Picture6.jpg Picture7.jpg Picture8.jpg Picture9.jpg Picture10.jpg Picture11.jpg Picture12.jpg
If you've ever had a group of numbered files on your disk, you'll know that the Finder doesn't do this. When you select "View By Name" what you get looks like this:
Picture1.jpg Picture10.jpg Picture11.jpg Picture12.jpg Picture2.jpg Picture3.jpg Picture4.jpg Picture5.jpg Picture6.jpg Picture7.jpg Picture8.jpg Picture9.jpg
This looks stupid, and it's because the System is just sorting the names lexicographically. By the same logic that dictates that "ab" comes alphabetically before "c" (which is correct) the System decides that "12" comes before "3" (which is stupid). D'oh! Natural Order works by overriding the System's comparison of the numerical portions of strings, and sorts them by numerical value instead of "alphabetical" value.
Drop Natural Order into the System Folder and Restart your Mac.
Natural Order works with all Macintosh System Software versions.
Natural Order works by overriding the System's IUMagString and IUMagPString functions.
Natural Order only overrides the sorting of the numeric parts of strings. It still uses your System's built-in sorting function for the textual parts of strings, so if you have your system set to some non-US sorting order, that order will still be honoured by Natural Order.
Natural Order uses the following rule to sort strings:
Because Natural Order works by overriding the System's IUMagString and IUMagPString functions, programs that use their own sorting order and do not call the System's comparison routines will not get any benefit from Natural Order.
You can get Natural Order from the usual Macintosh software archives, such as the MIT Info-Mac HyperArchive or directly from this server.
On a Macintosh, you should tell your users to install Natural Order, and you should change your software call the system's standard International Utility string comparison functions. This way the user gets the benefit of string sorting that conforms to their local language conventions, and you get the benefit of any future improvements in Natural Order without having to update your software.
If for some reason this solution is not suitable for you, you may include the Natural Order sorting algorithm directly in your software at no charge, providing that you credit my contribution in a piece of text such as a copyright or acknowledgements section that is visible to end users of the product.