Every letter in the world: Unicode and UTF-8

The same switches read as a number, a letter or a colour, depending only on the rule the reader brings.
A customer types the name Zoë into a sign-up form. Your database stores it. The next morning the welcome email says “Zoë”. Nobody changed the data. A different part of the system read the same bytes with a different rule.
Now a harder case. A user types the same name on two phones. Both look like “Zoë” on screen. Your code compares them and says they are different people.
By the end you will be able to write the UTF-8 bytes of any character by hand, say why those two names differ, and explain why one emoji on the screen can be five characters in memory.
The history (optional)
Unicode began as talks in late 1987 between Joe Becker of Xerox, Lee Collins and Mark Davis. Their first draft, in 1988, assumed 16 bits for every character. Unicode version 1.0 came out in October 1991 (source: the Unicode Consortium’s history pages).
UTF-8 came a year later. Rob Pike recalled in a 2003 email that Ken Thompson and he designed it in or around September 1992, at a diner in New Jersey, writing it out on a placemat. They were working on the Plan 9 operating system, and they moved Plan 9 to the new encoding within days. The placemat is Pike’s memory, so treat the story as his account.
Nothing in the lesson depends on this fold.
Before you start. Everything Is a Number (bits & bytes) showed that the same byte can be a number, a letter or a colour, depending on the reader’s rule. It also showed that a byte holds 256 patterns. Numbers for Real (signed ints, overflow, floating point) showed what happens at the edge of a fixed row of bits. Here the fixed row is a byte, and the problem is that 256 patterns cannot name every letter people write.