# Code Ranges: A Deeper Look at Ruby Strings

DevFeed: [Code Ranges: A Deeper Look at Ruby Strings](<https://devfeed.tech/articles/code-ranges-a-deeper-look-at-ruby-strings-1346.md>)

Original publisher: [Read original article](<https://shopify.engineering/code-ranges-ruby-strings>)

Author: Kevin Menard

Published: 2022-04-14T20:39:18Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Code](<https://devfeed.tech/topics/code.md>), [ASCII](<https://devfeed.tech/topics/ascii.md>)

Tags: [ascii](<https://devfeed.tech/tags/ascii.md>), [code](<https://devfeed.tech/tags/code.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

## AI overview

An informal technical examination of Ruby's encoding-aware string representation and the runtime behavior that makes it functional and performant. It covers mutable and immutable strings, frozen literals, Ruby's support for more than 100 encodings, default encodings such as UTF-8, US-ASCII, and ASCII-8BIT, validation, encoding compatibility checks, and the performance characteristics of ASCII and fixed-width encodings.

## Source excerpt

An informal look at what makes encoding-aware strings in Ruby functional and performant, providing insight into all the wonderful things the Ruby VM does.