How a Single ß Can Break Everything
summary
Android stores strings as UTF‑16 so emojis become surrogate pairs and a composed family emoji can make .length return 11, not 1; UTF‑8 dominates network IO but conversion happens constantly. A real bug: uppercasing German sharp S expands to "SS" and breaks a two‑cluster avatar limit; slicing with regex splits grapheme clusters. Fixes: use BreakIterator to count/substring grapheme clusters and avoid uppercasing characters that expand, plus normalize text (NFC) before storing.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 1:09Username profile bug
- 2:57Emojis break text
- 3:59Unicode history
- 4:43Encoding before Unicode
- 5:47Code points and representations
- 6:51UTF-8 vs UTF-16
- 7:56Why UTF-8 dominates
- 9:21UTF-8 self-sync
- 10:04Android string storage
- 11:13Legacy impacts
- 12:56Emoji complexity
- 13:41Unicode planes
- 14:46Non-BMP challenges
- 15:08Text normalization
- 16:31Graphic clusters
- 17:58String length issues
- 18:20Skin tone emojis
- 18:41Invisible code points
- 19:44Counting clusters on Android
- 20:48Regex fails Unicode
- 21:50Unicode matching
- 22:14Fixing profile initials
- 23:15Uppercase bug
- 24:39Inconsistent uppercase
- 25:44Zalgo text
- 26:28Real-world Unicode bugs
- 27:32Closing remarks
- 28:12Q&A
related talks
51mCharBusters - 10 Unicode Myths
34mEmoji Encoding, � Unicode, & Internationalization
28mEmoji Encoding
35mNO MORE □ — MASTERING EMOJI ON ANDROID
23mAndroid U+2764 (❤) Emoji
58mThe Power ⚡️ and Responsibility 😓 of Unicode Adoption ✨
36mNo More □ — Mastering Emoji on Android
21mEmoji Encoding, Unicode, and Internationalization
