The Unauthorized History of UTF
summary
Chronological account of why we have UTF-8, UTF-16 and UTF-32, with concrete tradeoffs and bugs: UTF-8 backwards-compatible with ASCII and saves space but allows invalid sequences that crash real software (example: a game chat causing a DoS). UTF-16 uses surrogate pairs make UTF-16 variable-length to reach characters beyond 65,536 (emoji, rare Chinese), Windows keeps 16-bit wide chars, C/C++ transcoding APIs are being deprecated and a P272 range-adapter implementation exists for safe transcoding.
AI-written summary · about
chapters (24)
- 0:00Introduction to UTF history
- 1:49Early text encoding systems
- 3:16Limitations of ASCII and code pages
- 5:04Birth of Unicode and 16-bit assumption
- 7:12UTF-8 design and backwards compatibility
- 9:20Problems with invalid UTF-8
- 10:24UTF-8 vs UCS-2 trade-offs
- 11:08Language interfaces for Unicode
- 12:30Emojis and font-based symbols
- 14:55Unicode running out of space
- 15:56Introduction of UTF-16
- 18:05Why switch to UTF-16
- 18:45UTF-32 and its limitations
- 19:06Windows vs POSIX wide character issues
- 20:13Modern C++ Unicode interfaces
- 22:01Proposal for better Unicode handling
- 23:07Timeline and rare Chinese characters
- 23:34Q&A: Unicode character limits
- 24:59Q&A: Detecting UTF encoding
- 25:45Q&A: Cross-platform file paths
- 26:47Q&A: Invalid UTF-16 paths
- 27:51Q&A: Exception handling in interfaces
- 28:12Q&A: C++ standard iteration limits
- 29:18Summary and closing
