ChicagoRuby: Downtow­­n - Handling String Encoding Failures/Normalizat­­­i­­on

ChicagoRuby: Downtow­­n - Handling String Encoding Failures/Normalizat­­­i­­on

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!


Benjamin Fleischer

November 03, 2015