Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Character order

ASCII-code order is also called ASCIIbetical order.[27] Collation of data is sometimes done in this
order rather than "standard" alphabetical order (collating sequence). The main deviations in
ASCII order are:

All uppercase come before lowercase letters; for example, "Z" precedes "a"

Digits and many punctuation marks come before letters; for example, "4"
precedes "one"

Numbers are sorted navely as strings; for example, "10" precedes "2"

An intermediate orderreadily implementedconverts uppercase letters to lowercase before


comparing ASCII values. Nave number sorting can be averted by zero-filling all numbers (e.g.
"02" will sort before "10" as expected), although this is an external fix and has nothing to do with
the ordering itself.

You might also like