liveBook · Manning

Code point

As explained in API Design Patterns

A Unicode code point is a numeric value assigned by Unicode to identify a character or other encoded abstract element.

A Unicode code point is a numeric value identifying a character or other encoded abstract element. Counting code points is more reliable than assuming every character occupies one byte. section 5.4.1 section 6.3.2

For storage limits, a conservative estimate treats each code point as four bytes by assuming UTF-32. Enforce maximum lengths explicitly and generally reject excessive input rather than silently truncating it. section 5.4.1

Visually identical text

The visible character “á” can use U+00E1 or the sequence U+0061 followed by U+0301. These representations look identical but produce different stored data, so unique web-API identifiers should generally use ASCII. section 6.3.2

How API Design Patterns covers it

How deep it goes
Explains code-point counting, UTF-32 sizing, normalization ambiguity, and ASCII recommendations without developing Unicode normalization in detail.
Examples
Uses “á” as both a single code point and a composed sequence to expose representation differences.
What it assumes
Assumes basic strings and web APIs while clarifying why characters, bytes, and code points cannot be treated as identical.
What you can do after
Apply code-point-aware limits, estimate storage conservatively, reject overlong strings, and choose ASCII for unique identifiers.
How it connects
Connects code points to Unicode, UTF-32, ASCII, string length, storage limits, normalization, and HTTP APIs.

Also explained in

Compare how 6 books explain code point →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of API Design Patterns. The section links point to the parts of the book it draws on.