次の方法で共有


Using funny characters in Outlook 2007 folder and category names - what's the sort order?

It's common to use "funny characters" (i.e., non-alphabetic symbols) in Outlook folder names, so that the folders sort in a specific order:

!!Super Important
!Important
All A's
Basically B's
...

Of course, the same principle can be applied to category names:

!Important
@Home
@Work
Project A
Project B
...

But how can you be sure that "!Important" will come before "@Home"? In other words, what's the sort order? This bugged me enough to sit down and work it out. So here's the sort order in Outlook 2007 (American English) for the symbols from an American standard keyboard layout:

  ! " # $ % & ( * , . / : ; @ [ ] ^ _ { | } ~ + < = >
then all the numbers
then all the letters

The hyphen and single quote are (almost) ignored, in that -A sorts after A but before B, and 'B sorts after B but before C. And yes, that's a space character before the ! character, so putting a space at the front of a folder name will make it sort to the very top. Sadly, there seems to be no special character that forces a folder to sort to the bottom of the list.

I'm sure there is an official name and explanation for this sort order, but my search engine fu has failed me. Help me, oh lazyweb!

Comments

  • Anonymous
    October 23, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/10/24/using-funny-characters-in-outlook-2007-folder-and-category-names-whats-the-sort-order/

  • Anonymous
    October 23, 2007
    Hi Jon, The official name and explanation for this sort order is the wonderful ASCII codes. Basically the ASCII code go like this: ! = 033 (ASCII) = 21 (HEX) " = 034 (ASCII) = 22 (HEX) ! is the first printable or non-control character, all the way to 126 or 7F for printable characters.  Not sure why the hyphen behaves as it does, so the sort order (if sorting by ASCII) should sort ZFolder before afolder as it's higher in the pecking order (I've not tested if this is the case or not). You can find all of the codes in all of their glorious 8 bitness somewhere like this:  http://www.asciicodes.us/ Cheers

  • Anonymous
    October 24, 2007
    Yes, it's got some ASCII ordering in there, but there's a lot that's not the same:

  1. The four symbol ranges in ASCII have been coalesced into one, so that all symbols now sort before all alphanumerics...
  2. ...with the exception of the hyphen and single-quote (and why the single-quote and not the double-quote?)...
  3. ...and the coalescing didn't even respect ASCII order. For example, the subsequence "< = >" comes before "{ | }" in ASCII, but after it in Outlook sort order. I'm sure somewhere there's a PM with a spec and a reason for why this is the way it is - I just want to find that spec :)
  • Anonymous
    March 25, 2008
    Thanks for the post. I was wondering why the ASCII order seemed to be out the window.

  • Anonymous
    June 03, 2008
    Thank you, Jonathan for all that tedious work. Our purposes in knowing the sorting order of keyboard characters were almost the same:   labeling/ naming folders so they sort in a specific order.  I had ALL computer file directories in mind, viz., My Computer/ Windows Explore & their relatives.  I hope you were faster than I.  9-1-2007 I typed out all characters which I could remember (rather than downloading keyboards full thereof, and sorted individual characters in Word Perfect.  It took me AGES, so you know I can appreciate your diligence. I know that work was saved 9-1-2007.  Well, so I believed!  Frequently I copy basic text from WordPerfect or other programs onto Notepad .txt files and delete the much more consumptive files.  That's so the files do not consume so much storage "space".  When I looked for a .txt file re. 'Character sorting order' today, the text file page was blank!  Ugh!  My Search Companion is not working right now, so did not want to spend another hour or so looking for a .wpd doc which might (likely) have gotten deleted. Then thought of the world of persons who might have already done such work.  Yes, Googling 'Keyboard character sorting order' led me to your blog and to bliss! You have it all right there on three lines! And I have those lines on a .txt doc named    Character sorting order.txt Making a shortcut for my desktop 'Shortcuts'  folder, then making another shortcut and changing its name to      ! " # $ % & ( * , . / : ; @ [ ] ^ _ { | } ~ + < = > (beginning with two spaces) for the desktop makes the order visible

  • Anonymous
    July 30, 2009
    Single Quote can be used as part of a name, thus attempts at honoring the alphabet.

  • Anonymous
    October 07, 2009
    Can you sort Outlook 2007 by categories even when there are multiple categories assigned to one entry?  It's not possible in Outlook 2003.

  • Anonymous
    November 19, 2009
    Thanks for posting this. The frustrating thing about this sort order is that there is no option for putting non-alphabetic folders at the end. Some folders are really important and need to be at the top.  Others are really unimportant and need to be at the bottom.  And sometimes both are really important but its also very important not to misfile. Thus the desire for space.

  • Anonymous
    August 30, 2010
    The comment has been removed