Ruby and Unicode, what could go wr�ng?
summary
A real failure mode is a non-breaking space slipping past app-store checks and creating a fake WhatsApp listing; Ruby’s ASCII-only strip doesn’t catch that. Ruby adds Unicode normalization (String#unicode_normalize since 2.2) and grapheme-aware iteration to help, but casing quirks (Turkish I) and combining marks make length and comparisons surprising. Examples include using a zero-width joiner to build emoji grapheme clusters and the hidden-binary trick that embeds IDs in invisible characters, so normalize, remove invisibles, and compare on normalized grapheme clusters.
AI-written summary · about
chapters (4)
- 0:00Start
- 10:07Current Unicode version is 10.0
- 30:21NFC Normalization Form Canonical Composition
- 31:03Compatibility Equivalence
related talks
38mTen Unicode Characters You Should Know About as a Programmer
24mThe Power and Responsibility of Unicode Adoption
38mInvalid byte sequence in UTF-8
32mWhy We Can't Have Nice Things: Unicode, Dates, and Names
34mThe Three-Encoding Problem
39mState of the Ruby
42mRuby 2 Methodology
23mWriting Ruby, just not in English!
