Cover for Mastering Ruby: Strings and Encodings
become
an
expert
Download
Richard Schneeman
From the Forward by Richard Schneeman
I've been using Ruby for over ten years, and I'm still surprised to find new corners to explore. It wasn't until I came across this book that I realized how deep the string "rabbit hole" went.

Why Strings?

They're everywhere!

As devs, you and I create tons of strings. Probably more than any other object on a day to day basis. How much do you really know about strings? How about encodings? How familiar are you with Unicode and UTF-8?

Do you know why this would happen?

'é' == 'é' # => false

Or why this length might be wrong?

'à'.length # => 2

Do you know what dummy encodings are?

Encoding::UTF_16.dummy? # => true

How about what this does?

[128077, 32, 128078].pack('U*')

Do you know how to use an encoding converter?

Encoding::Converter.new('UTF-8', 'US-ASCII')

Learn Everything

Walk away an expert!

Cover for Mastering Ruby: Strings and Encodings

become
an
expert

Barrett Clark, author of Data Visualization Toolkit
Mastering Ruby: Strings and Encodings is a fascinating and thorough discussion of strings. Aaron discusses the history of character encoding and then goes on to discuss how strings work and how we create and use characters. You may be thinking "huh, a whole book on just strings?" but Aaron does a good job of being informative and entertaining. 👍
- Barrett Clark, author of Data Visualization Toolkit
Amir Rajan, CEO of RubyMotion and creator of A Dark Room
The world operates on strings (you're reading one right now). Having a solid understanding of their internals, how to manipulate them, and all the "devil in the details" is incredibly important. Aaron's book is a fantastically informative read on all things `String` related.
- Amir Rajan, CEO of RubyMotion and creator of A Dark Room
Charles Maresh
I like how the book builds up concepts, layering one on the next. I've learned a lot about encodings, code points and backward compatibility. And the flow of information and content is really well done.
- Charles Maresh
Chris Krailo
Essential, valuable knowledge for all Ruby devs! I keep coming back to the lessons in this book, even senior devs will learn things. A+, would recommend!
- Chris Krailo
Cover for Mastering Ruby: Strings and Encodings

become
an
expert

About the Author

Photo of Aaron Lasseigne

Hi, I'm Aaron Lasseigne. I've been using Ruby for more than a decade. During that time, I've presented and written about Ruby including 13 articles in Ruby Weekly. I organize the Dallas Ruby Brigade and participate in open source. My most successful contribution is the ActiveInteraction gem with over 1.8k stars on GitHub.

While doing all of this I've gained a strong understanding of Ruby and I'm excited to share what I've learned.