
ing, which is very common in the Western world, has only one registered name, win-
dows-1252, but it is often declared as cp-1252 or cp1252.
The case of letters is not significant in character encoding names. Thus, “ASCII” and
“Ascii” are equivalent. Hyphens, on the other hand, are significant in the names.
Single-Octet Encodings
For a character repertoire that contains at most 256 characters, there is a simple and
obvious way of encoding it: assign a number in the range 0–255 to each character and
use an octet with that value to represent that character. Such encodings, called single-
octet or 8-bit encodings, are widely used and will remain important. There is still a large
amount of software that assumes that each character is represented as one octet.
Various historical reasons dictate the assignments of numbers to characters in a single-
octet encoding. Usually letters A–Z are in alphabetic order and digits are in numeric
order, but the assignments are otherwise more or less arbitrary. Besides, any extra Latin
letters, as used in many languages, are most probably assigned to whatever positions
that were “free” in some sense. Thus, if you compare characters by their code numbers
in a single-octet encoding, you will generally not get the right alphabetic ordering by
the rules of, for example, French or German.
Multi-Octet Encodings
As you may guess, the next simpler idea of using two octets ...