Forum

  • If you are new to these Forums, please take a moment to register using the fields above.

Announcement

Announcement Module
Collapse
No announcement yet.

Alphabetical sorting - Any characters that are sorted to bottom?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alphabetical sorting - Any characters that are sorted to bottom?

    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!

  • #2
    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...

    Comment


    • #3
      Thanks Nick! That will work fine.

      Comment


      • #4
        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
        Last edited by dusanv; 08-06-2009, 02:53 PM. Reason: spelling

        Comment


        • #5
          for those that aren't techies

          Originally posted by dusanv View Post
          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

          Comment


          • #6
            Originally posted by Barb View Post
            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

            Comment


            • #7
              Outlook does not seem to use a normal ASCII sort

              Originally posted by dusanv View Post
              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.

              Comment


              • #8
                Good to know

                Originally posted by Eureka! View Post
                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.

                Comment


                • #9
                  No. Use zz or zzz prefix.

                  Originally posted by dusanv View Post
                  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.

                  Comment


                  • #10
                    You're right about the Zeds

                    http://support.microsoft.com/kb/100366

                    Ah the joys of working in computers.

                    Comment


                    • #11
                      Thank you.

                      Originally posted by CoffinDodger View Post
                      You're right about the Zeds

                      http://support.microsoft.com/kb/100366

                      Ah the joys of working in computers.
                      I was trying to find this information. Thank you.

                      Comment


                      • #12
                        Originally posted by TesTeq View Post
                        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
                        Last edited by dusanv; 08-09-2009, 07:43 PM. Reason: change 1 word

                        Comment


                        • #13
                          Programmer's misconception.

                          Originally posted by dusanv View Post
                          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.

                          Comment


                          • #14
                            Originally posted by TesTeq View Post
                            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

                            Comment


                            • #15
                              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.

                              Comment

                              Working...
                              X