Cover for Mastering Ruby: Strings and Encodings
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?'UTF-8', 'US-ASCII')

Learn Everything

Walk away an expert!

Cover for Mastering Ruby: Strings and Encodings


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


What if I’m unhappy with the book?

There is a 30 day 100% money-back guarantee. Buy the book, give it a try, and if you really aren't happy with it, I'll refund your money.

What if I don't learn anything?

Impossible! There's so much good information packed into these chapters that I'll bet you learn a lot. If you really don't feel like you got anything out of it, you've always got the 30 days to get a refund.

Does the book cover internationalization?

No. I've done internationalization work and that's its own whole book. However, you can't internationalize your code without understanding encodings. This book will provide you or your team with a rock solid foundation that will let you take on the next step of internationalization with confidence.

Can I get a discount on a bulk purchase?

Absolutely! Send me an email at [email protected] and I'll make sure you get a discount.

Cover for Mastering Ruby: Strings and Encodings


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.5k 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.