Visual RFC.
ALL RFCs / RFC 3629
Read the RFC ↗
RFC 3629 / MECHANISM GUIDE

How can a symbol fit into small computer pieces?

01

A computer stores numbers in small pieces called bytes. Different text items need different numbers of pieces.

RFC 3629 · § 3EXAMPLE
1 / 4 · Choose one text item

We want another computer to read this same item.

What we want to store€

What happens if you change this?

Make one change, then watch again. Restart restores the original example.

3 / 3
03
Read byte roles

E2 82 AC has one leading byte and two continuation bytes.

How can a symbol fit into small computer pieces?A computer stores numbers in small pieces called bytes. Different text items need different numbers of pieces.How can a symbol fit into small computer pieces?€ · U+20ACE282AC1110xxxx 10xxxxxx 10xxxxxxLeading byte + two continuation bytes

Key idea: One text item can need several bytes. Counting bytes is different from counting what you see.

Terms
UTF-8
A rule for turning Unicode character numbers into ordered bytes, and back.
Code point
A character number in Unicode. A scalar value excludes reserved surrogate numbers.
Byte / bit
A byte is eight bits. A bit has one of two values: zero or one.
Leading / continuation byte
The first piece tells the reader how many bytes belong together. Following pieces start with the bits 10.
Normalization
A specified way to transform Unicode text before comparison. It does not turn every lookalike into the same letter.
BOM
A contextual initial encoding signature. UTF-8 never uses it to switch byte order.

Look up a term in the glossary ↗

Rules & examples
  • ASCII values use one byte with the high bit clear.
  • Other scalar values use two, three, or four bytes.
  • Continuation bytes begin with 10 in binary.

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

RFC 3629 §3. U+20AC → E2 82 AC. A byte is eight bits. These examples each contain one Unicode scalar value; a visible symbol can contain several code points. ASCII uses one byte; modern UTF-8 never uses five or six.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

Start with this guide; no earlier guide is needed for the overview.

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

What changed
RFC 2279RFC 3629 §12

The revision restricts UTF-8 to U+0000–U+10FFFF and makes rejection of invalid sequences normative; the resulting maximum is four bytes.

Read the updated RFC section ↗

All chapters in RFC 3629

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗