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 each common letter a code 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.
If a file is decoded with a different encoding from the one used to save it, the bytes can turn into unexpected characters. Both programs need compatible encoding rules. The problem is a decoding mismatch, not the font size.
ASCII covers only a limited set of characters. Unicode gives characters code points for many writing systems and symbols. Encodings such as UTF-8 store those code points in one to four bytes.
The same bits can represent a letter, a colour value, or part of a sound. The file format and its decoding rules tell the program how to interpret them.
When text opens as odd symbols, check which encoding the file uses and which encoding the program chose to decode it. A mismatch can produce the wrong characters.
A text file is a file of numbers, readable only with the matching character table.
Lesson text, worked examples, flashcards and practice questions with worked steps, written for this dataset.
Enrichment facts and media are adapted from the cited source records; revised flashcards preserve the cited source credit.
2 · Watch
En anglaisTake it off screen
Where it sits
Learn first
Optional connections
This opens up
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.