character hierarchy

Lt Major Burns

"Dicky" Charlteston-Burns
in os x, what are the highest and lowest characters? like, for example, exclamation marks are higher than full stops, which are higher than apostraphes, which are higher than quotations, and numbers come befo0re alphabet characters, then spaces are below z.

does anybodsy have information as to the exact hierarchy? or just the top and bottom few?
 
Is your question more about sort-ordering than just key codes?

The answer to your seemingly-simple question can be quite complex. It depends on the local language you are using, what keyboard encoding you use, the app that you are using, the specific need for the sort, and a whole host of other factors.

I suppose it would help if you provide more details about what you want to do.
 
In which encoding? Which language? In general you cannot say that for sure since simply changing the locale can change the sort order of strings. This is a complex and subtle problem that really matters based on what you are trying to do.

Also even in a boring C context you are not guaranteed about the ordering of any characters outside of a given run of common rage.

Fun Huh?

Edit: Oops simu-post with DeltaMac
 
I use the ~ symbol and spaces to make things appear above 'a' in alphabetical lists if that helps.
 
yeah, basically, i want a character higher up than '!'. i want a huge chunk of songs to be sorted higher than an album by !!!, after that is a couple of albums that start with '...and', then after that is ' and ".
 
Based on Comparison of filesystems wikipedia, OS X's UFS Plus filesystem uses
Unicode character set. This means that you can use almost every character there
is in the world in your file names. Since start of the Unicode (characters
U+0001 to U+007F) is same as Ascii, ! is the lowest character. But
since Unicode is so large, not all codes are yet in use. Code U+FFFD
is specified as "character replacement character", a kind of escape character.
You cannot use it in names, I guess.

BTW. The filesystem Wiki says:

HFS Plus mandates support for an escape sequence to allow arbitrary Unicode. Users of older software might see the escape sequences instead of the desired characters.

This means that you might not like to use unicode characters if not necessary.
 
I've noticed a few higher than '!'. I like to use the dash family to force sorting. In order of top to bottom:

Underscore: _ (shift-hyphen)
Hyphen: - (hyphen)
En dash: – (option-hyphen)
Em dash: — (option-shift hyphen)

All appear before normal punctuation marks.

I haven't actually tested these in iTunes, though. It's entirely possible it uses a different sorting routine than the Finder.
 
mikuro, i may have to start paying you...

all the dashes, including underscores appear to sort higher up than !.

(i have a large amount of mind-numbing work to get in for monday morning, so i'm sorting out my iTunes library, obviously...)
 
Back
Top