Windows Explorer's non-ascii default sort order

Posted by: tanstaafl.

Windows Explorer's non-ascii default sort order - 29/06/2011 14:03

One of the many small frustrations I find in Windows is Windows Explorer's default sort order. In their infinite wisdom, Microsoft decided way back in the XP era that it made sense to sort in what they called "logical order", rather than ascii. For example:

PO Box 4250
PO Box 751
PO Box 95

is how I would expect to see something sorted, but Explorer sorts it just the opposite, based not on the ascii ascension of 4, then 7, then 9, but on the logical values of 95, 751, and 4250. I guess there is some rationale behind this, but I am old school and prefer my sorts to be plain ascii. Also, the Microsoft way puts all special characters (you know, the `~!@#$%^&*()-_=+\| thingies you see above your numeric keys) ahead of all alpha character in the sort order, and doesn't seem to discriminate between upper and lower case letters.

Back in the XP days there was a registry edit you could perform in the

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

key, but that key does not appear in Windows Vista.

Is there a way to force true ascii sorting as an Explorer default in Windows Vista?

tanstaafl.
Posted by: wfaulk

Re: Windows Explorer's non-ascii default sort order - 29/06/2011 14:28

Are you sure? This claims that's still what you need to do.
Posted by: Roger

Re: Windows Explorer's non-ascii default sort order - 29/06/2011 15:08

Originally Posted By: wfaulk
Are you sure? This claims that's still what you need to do.


And this KB article explicitly says that it works on Vista.
Posted by: tanstaafl.

Re: Windows Explorer's non-ascii default sort order - 29/06/2011 20:21

Originally Posted By: wfaulk
Are you sure? This claims that's still what you need to do.
I must be going blind in my old age. When I looked for that key before I couldn't find it, but now there it is. I've made the modification, I'll see what happens when I reboot. It looks like that only changes the way numbers are sorted, and does not revert to a full ascii sort. I'll keep you posted.

tanstaafl.
Posted by: tanstaafl.

Re: Windows Explorer's non-ascii default sort order - 01/07/2011 16:19

Originally Posted By: tanstaafl.
I'll keep you posted.
Yeah, as I thought, it changes the sort on numeric information, but the rest of the sorting process is still non-ascii.

Where I would expect files to sort:

$File1
250File2
45File3
File4
~File5

Explorer sorts them

$File1
~File5
250File2
45File3
File4

and before the "logic fix" it sorted them

$File1
~File5
45File3
250File2
File4


with all special characters sorting ahead of both alpha and numeric characters. frown

Oh, well, given the general state of the world, this is a pretty trivial problem, I guess.

tanstaafl.
Posted by: Roger

Re: Windows Explorer's non-ascii default sort order - 01/07/2011 16:29

Originally Posted By: tanstaafl.
but the rest of the sorting process is still non-ascii.


Windows doesn't use ASCII. It uses Unicode (actually UTF-16). But that's actually irrelevant. The sort (actually collation) order is set according to your locale/language settings. All the previous setting (the one we've been talking about) does is turn off the "break filenames into tokens and sort so that numbers are sorted as numbers" mode. The ordering of the individual characters is still not actually ASCII.

Why do you want these files in ASCII order, anyway?
Posted by: tanstaafl.

Re: Windows Explorer's non-ascii default sort order - 01/07/2011 22:37

Originally Posted By: Roger
Why do you want these files in ASCII order, anyway?
Completely trivial reason, really. Sometimes I like to put a special character (such as ~) as the first letter of a file or directory name to force it to sort to the bottom of the list. Can't do that anymore. Instead, now I put a lower case "z" as my "special" character, looks ugly. smile You know me... if it's different from what I'm used to, it can't be any good.

tanstaafl.