Ruby Taught Me About Encoding Under the Hood
summary
Reports an IRB crash caused by a family emoji that is actually 7 code points long; fixes move from counting code points to treating user-visible characters as a grapheme cluster, preventing backspace misalignment. Upgrades Ruby’s Unicode data to 15.1 and adds IndicConjunctBreak, regenerates tables with Enc::Unicode.rb, and patches the regex engine by emitting a combined Onigumo node for extended grapheme rules. Merge succeeds into Ruby 3.5 but Unicode 16.0.0 normalization tests still fail.
AI-written summary · about
chapters (8)
- 0:00Introduction and welcome
- 3:32History of text encoding
- 16:19Encounter with EBCDIC
- 24:01Byte count pitfalls in Ruby
- 31:43Unicode and grapheme clusters
- 36:37Upgrading Ruby to Unicode 15.1.0
- 45:22Unicode 16.0.0 challenges
- 49:35Closing remarks and thanks








