by Samy (Kondasamy Jayaraman)

Module 55 · Text and Unicode

Beginner

Every letter is a number

Text is stored as numbers, and a table turns them back into letters. Here you punch Larkspur’s customer names onto paper tape and read them back, once with the wrong table.

Read as

The whole idea in one example

Same bytes, two tables

Read as UTF-8

right

Zoë

90 111 195 171

Read as Latin-1

garbled

Zoë

90 111 195 171

Both read by the browser’s own text reader from the same bytes, which the punch wrote in UTF-8.

How it works

Four ideas carry the module

  1. 1 Letters are numbers

    One row of holes per byte

    RFC 20 (1969) set out ASCII for network interchange: a 7-bit code, so 128 characters, numbered 0 to 127.

    Source, checked 30 October 2026

  2. 2 UTF-8

    One to four bytes a character

    RFC 3629: UTF-8 writes each character in 1 to 4 bytes (octets), and US-ASCII characters as one byte each, unchanged.

    Source, checked 30 October 2026

  3. 3 The wrong table

    Same bytes, garbled name

    The WHATWG Encoding Standard treats the names “latin1” and “iso-8859-1” as windows-1252, so browsers read Latin-1 text with the Windows-1252 table.

    Source, checked 30 October 2026

  4. 4 Same look, different bytes

    Normalise before you compare

    Unicode’s UAX #15: its NFC form joins e and a separate accent mark into the single code point é, so the same text typed two ways comes out the same.

    Source, checked 30 October 2026

The story

Larkspur’s telegraph office

A Larkspur Supply Co. label prints “Zoë” for Zoë; the team finds every character is a number, UTF-8 writes it in 1 to 4 bytes, and text breaks when the reader’s table differs from the writer’s. You’re at the punch.

4
bytes for “Zoë” in UTF-8, 3 characters
172,808
characters in Unicode 18.0
8 · 1
the family emoji’s length in JavaScript, and what people see
9
Larkspur Supply Co. customers checked in chapter 7, 2 settings that work

Your path

The chapters

  1. Chapter 1

    Letters are numbers

    How does a computer store a letter?

  2. Chapter 2

    One number for every character

    How can one table number every character in every script?

  3. Chapter 3

    UTF-8: one to four bytes

    How does UTF-8 write any code point as bytes, and keep English at one byte?

  4. Chapter 4

    The wrong table

    What happens when the reader uses a different table from the writer?

  5. Chapter 5

    One emoji, many numbers

    Why does one emoji have several different lengths?

  6. Chapter 6

    Same look, different bytes

    Why do two strings that look the same compare as different?

  7. Chapter 7

    Workbench: the name field

    What should a name field count, and up to how many, so every name fits and matches?

Who it’s for

  • Engineers
  • Product managers
  • Analysts
  • No code needed

Anyone who has seen a name turn into odd symbols, or a form refuse an emoji, and wants to know why. No other module is needed first; Tokens builds on these bytes.