Character Sets: Storing Text as Numbers
Every character has an agreed number, and the text on screen is those numbers drawn by a font. A shared standard is what lets two machines read the same file, and one byte per character stopped being enough.
What a learner can do afterwards
- Explain what a character set is and why both machines have to use the same one
- Work out the code of a letter given the code of another letter in the same run
- Say why scripts beyond Latin, and emoji, needed a larger standard
1 · Read
Computers store letters as numbers. A character set is the agreed table that pairs each letter, digit and symbol with a number, and the font draws the number back as a shape you can read. Both machines must use the same table, or the numbers turn back into the wrong text.
Early tables were small: one well-known table gives the common letters codes under 128, with A at 65. Since letters in a run sit side by side, B is 66 and C is 67. One byte per character was simple and fast.
One byte stopped being enough when scripts beyond Latin and emoji needed far more codes. The world moved to wider standards that hold hundreds of thousands of characters. The same bits can mean a letter, a colour shade or part of a sound, so the agreed code decides the meaning.
When text opens as odd symbols, suspect the table first. A mismatch of character sets is the classic cause.
A text file is a file of numbers, readable only with the matching character table.
2 · Watch
Take it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.