Meetup Video
Handling String Encoding Failures/Normalization by Benjamin Fleischer
Recorded November 03, 2015 at ChicagoRuby Downtown
Ruby 1.9 and better is encoding-aware. It has a representation of the external encoding and an internal encoding that it uses to process input and output. Each file has an encoding. The most common place we encounter encodings is when we read in, write, or otherwise manipulate strings. There are a lot of gotchas in working with strings and the possible exceptions they may raise. Learn how to use string encodings and how to handle any encoding issues as you follow my journey from just installing rack-utf8_sanitizer through writing comprehensive (passing) tests around RSpec’s EncodedString. Works on Windows, too!
About Benjamin Fleischer
Benjamin Fleischer has been a developer since 2010 and is quite active in the open-source software community. In addition to maintaining and collaborating on SimpleCov, AcitveModelSerializers, Mail, RMagick, rack-utf8_sanitizer, Acts-As-Taggable-On, and RubyFriends.com, he has contributed to Passenger, Kaminari, RubyGems, Homebrew, Bcrypt-ruby, CodeClimate test-reporter, Rack, and Rails.
More Videos
-
Reusable JSON Schemas | Hotwire Your UX by Andy Andrea and Patrick McSweeny
November 04, 2025
-
Perfect Data Isn’t Realistic | Single Schema With UUIDs by Peter Bhat Harkins and Prarthana Shiva
October 01, 2025
-
Zen Automation | Better Team Organization by Aji Slater and Jim Remsik
September 04, 2025
-
Job Testing | Wrangle Domain Complexity with Foobara by Stephen Margheim and Miles Georgi
August 07, 2025
-
Real-world strategies for scaling Rails applications | Domain Driven Design by Andrzej Krzywda, Alan Ridlehoover and Fito von Zastrow
June 04, 2025