You only really think about a string’s encoding when it breaks. When you check your exception tracker and see
1 Encoding::InvalidByteSequenceError: "\xFE" on UTF-8
staring you in the face. Or maybe “they’re” starts showing up as “theyre”.
So, when you have a bad encoding, how do you figure out what broke? And how can you fix it?
What is an encoding?
If you can imagine what encoding does to a string, these bugs are easier to fix.
You can think of a string as an array of bytes, or small number...
Published on September 15, 2015 23:59