Episode #468: Line Endings

Have you ever written some Ruby code, only to have someone complain that it mangles text or raises data corruption errors on their machine?

Often, these kinds of problems result from text vs. binary file encoding incompatibilities on different operating systems. To understand why this happens in a modern, high-level language such as Ruby, you need to dig into the language's C roots. And to understand file encodings in C, you have to go back just a little bit further...

This page is just for members. Sign in or subscribe to gain access!