Alphabetical sorting - Any characters that are sorted to bottom?

Eureka!

Registered
I know you can put characters like @, #, $, etc....to sort items to the top that would normally be sorted in normal alphabetical order, but are there any characters you can lead with that automatically sort to the bottom?

I suppose I could start with a "Z" if there's no easier way to accomplish that.

Thanks!
 

nick_ross

Registered
zz is the answer

Whenever I've needed to do this, I use 'zz' as a prefix as that will put the item to the bottom of the list

Parrot
Snake
Zebra
zz End of List

Works for me :)

btw - apologies for the lame example - couldn't think of another example with a Z in it... :???:
 

dusanv

Registered
If this is what you are looking for, all of the characters {, |, } and ~ have higher ASCII values than 'z', so they should sort at the end.

Dusan
 

Barb

Registered
for those that aren't techies

dusanv;69824 said:
If this is what you are looking for, all of the characters {, |, } and ~ have higher ASCII values than 'z', so they should sort at the end.

Dusan

Can you 'splain this a bit? Wouldn't a high ASCII move something up the list instead of down?

I'm over my head by even asking the question, so please bear with me :)
 

dusanv

Registered
Barb;69825 said:
Can you 'splain this a bit? Wouldn't a high ASCII move something up the list instead of down?
No. For example, 'A' has ASCII value of 65 (decimal), while 'Z' has 90 -- see which is sorted at the top.

Dusan
 

Eureka!

Registered
Outlook does not seem to use a normal ASCII sort

dusanv;69824 said:
If this is what you are looking for, all of the characters {, |, } and ~ have higher ASCII values than 'z', so they should sort at the end.

Dusan

Thanks Dusan,

But it seems that Outlook treats all non-alpha characters the same and sorts them to the top of the order. I just tried the pipe symbol and the braces and they go to the top like all of the other symbols.

I think zz will work just fine for my purposes.
 

Barb

Registered
Good to know

Eureka!;69831 said:
Thanks Dusan,

But it seems that Outlook treats all non-alpha characters the same and sorts them to the top of the order. I just tried the pipe symbol and the braces and they go to the top like all of the other symbols.

I think zz will work just fine for my purposes.

I use z currently. I never thought of zz. But I learned something about ASCII values today and it will come in handy somewhere in my life. Thanks for clearing that up.
 

TesTeq

Registered
No. Use zz or zzz prefix.

dusanv;69824 said:
If this is what you are looking for, all of the characters {, |, } and ~ have higher ASCII values than 'z', so they should sort at the end.

Maybe they should but show me one program that sorts in this way.

For example:

Microsoft Windows folders are sorted by name:
{ala}
ala

Microsoft Outlook Express folders are sorted:
{ala}
ala

The only reliable method is to use the "zz" or "zzz" prefix.
 

dusanv

Registered
TesTeq;69855 said:
Maybe they should but show me one program that sorts in this way.
Actually, almost every program I use sorts it that way, but unfortunately none of them work in Windows -- or at least not without an emulator. I should have mentioned that I've been primarily using Linux for long time now and should have also made it clear that any well-behaved program would sort in the ASCII order if you also have the collation order set to ASCII (or "C"), which is easy to specify with an environment variable in Linux (and I suppose in all of the other Unix-like systems).

Admittedly, the discussion has intrigued me -- is it not possible to specify the collation order for a user in Windows? No environment variable, no registry setting, nothing along the lines of setlocale(LC_COLLATE, "C") somewhere from the startup files? Is there not such a possibility? I am aware that many would not prefer the ASCII collation order, but for the rest of us -- is there a way? It would also do the "trick" of {, } and ~ sorting at the end.

Note that I am not intending to start yet another Linux vs. Windows debate and especially not here -- I support the idea that everyone should use whichever OS or software can get things done for them in an easier or more convenient way.

Dusan
 

TesTeq

Registered
Programmer's misconception.

dusanv;69949 said:
Actually, almost every program I use sorts it that way, but unfortunately none of them work in Windows -- or at least not without an emulator. I should have mentioned that I've been primarily using Linux for long time now and should have also made it clear that any well-behaved program would sort in the ASCII order if you also have the collation order set to ASCII (or "C"), which is easy to specify with an environment variable in Linux (and I suppose in all of the other Unix-like systems).

It is very popular programmer's misconception that people should follow the rules imposed by the programming standards (ASCII character set) and paradigms. You should really read http://support.microsoft.com/kb/100366 and IBM Document GG24-3516, "Keys to Sort and Search for Culturally Expected Results," Denis Garneau. Numerical order isn't always "culturally expected" - for example in the non-english languages cases.
 

dusanv

Registered
TesTeq;69958 said:
It is very popular programmer's misconception that people should follow the rules imposed by the programming standards (ASCII character set) and paradigms. You should really read http://support.microsoft.com/kb/100366 and IBM Document GG24-3516, "Keys to Sort and Search for Culturally Expected Results," Denis Garneau. Numerical order isn't always "culturally expected" - for example in the non-english languages cases.
I am not saying that people should follow certain programming standards, rather I myself wish to follow them wherever they suit my needs. As for the suggested readings, I've put that on a Someday list, but for now let me say that if I've understood correctly your point regarding culturally-expected behavior, then that's why there are internationalization and localization, which utilizes the concept of a locale. Further, most modern operating systems, presumably in line with the setlocale() semantics, allow us to change either the entire locale or a specific portion of it. So my question was if there is a way in MS Windows to change that specific portion of a locale known as the collation order? A simple yes/no/maybe would suffice. And if there is a way, it could be changed to "C" as "C" is a valid locale in Windows. BTW, I already said it would've been just my personal preference and that I knew many would not like this sort order -- I know that since my native language is non-English as you may have concluded from my writing, so I am aware of the issues.

Dusan
 

CoffinDodger

Registered
Although the user can specify may of the regional settings like currency and date / time formats on Windows XP, they do not appear to be able to control the sort order.

That's as close as I can get to a "no" for you.
 

graphicdetails

Registered
This isn't "exactly" the same, but is a trick that is along the same lines, so I thought a good place to mention. I use this on my pda.

If you put a space in front of your title or category, it sorts to the top.

So if you have...

Item
(space) Item

The one with a space will sort to the top. At least it does on my Palm Treo. This is handy for me so I don't have to see any strange characters. I've put a space in front of 4 or 5 categories just to have the one I want located on the bottom.
 

Cpu_Modern

Registered
TesTeq;69958 said:
It is very popular programmer's misconception that people should follow the rules imposed by the programming standards (ASCII character set) and paradigms.

Touch-down TesTeq!
 

dusanv

Registered
Cpu_Modern;70181 said:
Touch-down TesTeq!
I was assuming we weren't playing football here. Regardless, I actually agree with the part you quoted. I use the ASCII sort order simply because the default sort order in Gnome is even more inappropriate for me than is that in Windows, for example "aaa", "{aaa", and "~aaa" all sort before "bbb", so there's no way of having special characters sorted first or last, and I need @context lists to be more prominently visible.

But I do think that programmers (as opposed to people in general) should follow the programming standards, as that is the only reliable way of writing portable code. And of course, ASCII is way obsolete for many purposes. But as this is not a programming forum, I wish we could put an end to this discussion.

Dusan
 
Top