Unicode in Rust - Illustrated by Kanji
summary
Rust claims strings are UTF-8 and therefore cannot be indexed as characters; attempting to slice by bytes can panic because code points span 1–4 bytes. Examples use Kanji and the Han unification to show Unicode history from Oracle bone script and explain why first Unicode editions condensed thousands of CJK variants into ~20,000 slots. Current numbers: ~137,000 assigned code points with ~70,000 for CJK. Practical fixes are use .chars() or a grapheme crate and normalize strings before comparisons; Rust enforces UTF-8 at compile time.
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:37Jenny Manning
- 1:02String Indexing
- 2:29Why is Unicode so complicated
- 2:47Oracle Bone Script
- 3:29Traditional Chinese
- 4:23ASCII
- 4:49Unicode
- 5:44Character
- 7:02Abstract Character Shapes
- 8:18New Romans
- 8:59Korean Chinese Japanese
- 9:39Consequences
- 11:28Unicode Code Space
- 13:27Supplementary Multilingual
- 13:50Second Volume
- 14:53Usage
- 17:44Why we care
- 18:56Best practices








