String sorting is not done by ASCII code any more.

Raymond Chen

Just because you have the ASCII table memorized doesn’t mean you know how sorting works.

I remember a bug filed where somebody said that the “sort” command was sorting underscores incorrectly:

AAA__
AAAAA

this was claimed to be wrong “because underscore character follow uppercase letters and precedes lowercase letters”.

Well perhaps it does if you think ASCII sorting is the way sorting should be.

ASCII sorting is so last century.

The CompareString function describes two types of sorting, “word sort” and “string sort”. And both of them sort punctuation before letters.

0 comments

Discussion is closed.

Feedback usabilla icon