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

Validate byte sequences

03

Correct byte roles are necessary but not enough: range and shortest-form rules matter.

Related RFCs and changes

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

DIAGRAM§ 4 ↗
RFC 3629 · § 4EXAMPLE
3 / 3
Validate byte sequencesCorrect byte roles are necessary but not enough: range and shortest-form rules matter.Validate byte sequences2FValid slash: one byteUse the shortest permitted form
03
Use valid encoding

Slash is represented by the single byte 2F.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
KEY POINT

Do not decode invalid sequences or surrogate values as valid characters.

  • Do not decode invalid sequences or surrogate values as valid characters.
  • UTF-8 does not encode values above U+10FFFF.
  • Overlong sequences can create security failures when filters and decoders disagree.
DETAILS

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

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. Variable-length encoding
  2. Pack a code point
  3. Validate byte sequences
  4. Byte-order mark
  5. Text comparison and security

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 ↗