Lucky 7 - Designing Text Encodings for C++
summary
Proposes a minimal encoding object with exactly seven elements — lucky seven — (code_point, code_unit, state, max_code_points, max_code_units, encode_one/decode_one, plus result types) and shows it composes whole APIs: streaming ranges, validation, counting, and transcoding by a simple decode-then-encode loop. Demonstrates real numbers: UTF‑8 expands up to max code units 4, EBCDIC example uses max 6, and std::text helpers (encode/validate/transcode) implement the loop safely with error handling.
AI-written summary · about
chapters (9)
- 0:00Start
- 0:48PREVIOUS WORK
- 14:05EXAMPLE ENCODING (RESULT TYPES)
- 15:46EXAMPLE ENCODING (ERROR HANDLERS)
- 18:44EXAMPLE ENCODING - COMMON
- 22:40STANDARD ENCODINGS FOR C++23
- 27:57TRANSCODE IMPLEMENTATION...
- 33:27LOOP AND CHECK
- 45:35QUESTIONS?








