0 bytes punched, read with UTF-8.
Chapter 3 of 7
UTF-8: one to four bytes
Code points run past a million, but a byte holds only 0 to 255. Something has to write big numbers as bytes.
This chapter: How does UTF-8 write any code point as bytes, and keep English at one byte?
About this chapter
You will learn
- UTF-8 spends 1 to 4 bytes a character
- ASCII stays one byte, unchanged
- Lead bytes say how many follow
Words you’ll meet
- UTF-8
- The usual way to write code points as bytes: 1 to 4 bytes each, ASCII unchanged.
- Lead byte
- A character’s first byte; its top bits say how many bytes follow.
Step 1 of 4
A byte holds up to 255. The punch writes , which spends more bytes on bigger numbers.
Predict how many bytes “Zoë” takes.