Unicode Text Handling Reference

Text boundaries, normalization, case handling, and encoding decisions for multilingual applications.

  • JSON5,554 B
  • YAML3,931 B · −29%
  • TOON3,262 B · −41%

Text boundaries, normalization, case handling, and encoding decisions for multilingual applications. Each row includes a practical application and a failure to check before using it.

Use it when

  • Build search that handles composed and decomposed text.
  • Choose the unit for text length or truncation.

Watch out for

  • Preserve original text when using a lossy search transform.
  • Identifier security requires more than normalization.

The data

ConceptExampleUsePitfall
UTF-8 bytesé occupies two UTF-8 bytesMeasure network and file size.A byte count is not a character count.
Code pointU+00E9 is LATIN SMALL LETTER E WITH ACUTEIdentify a Unicode scalar value.A visible character can contain several code points.
Grapheme clustere plus combining acute can display as one characterMove a caret or truncate visible text.Code-point slicing can split a visible character.
NFCCompose canonically equivalent sequences where possibleNormalize text used for ordinary comparison.It does not remove accents.
NFDDecompose canonical equivalentsInspect combining marks or build a deliberate search transform.Removing every mark changes meaning in many languages.
NFKCApply compatibility decomposition and compositionNormalize selected identifiers under an explicit policy.It can change distinctions the original text intended.
Case foldingTreat selected uppercase and lowercase forms as equivalentBuild Unicode-aware caseless matching.Locale and security requirements still matter.
Turkish dotted II, İ, ı, i require deliberate handlingTest Turkish search and casing.ASCII-only lowercasing is not a complete locale policy.
Bidirectional textArabic or Hebrew mixed with Latin identifiersRender mixed-direction labels safely.Invisible controls can obscure visual ordering.
Confusable charactersLatin a and Cyrillic а can look alikeReview identifiers and suspicious domains.Visual similarity does not imply string equality.

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
dataconceptstringUTF-8 bytes
dataexamplestringé occupies two UTF-8 bytes
datausestringMeasure network and file size.
datapitfallstringA byte count is not a character count.

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.com/api/dataset/unicode-text-handling?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/unicode-text-handling.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Sources and editorial notes

Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses.

Editorial review: . Source documents keep their own licenses.

Topics

  • programming-languages
  • unicode text handling
  • reference
  • engineering

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets