&gt; In Rust a string is a sequence of unicode scalar values.<p>The representation of a Rust String in memory is guaranteed valid UTF-8. To me, a &quot;sequence of Unicode scalar values&quot; is an abstract description, because it could be implemented via UTF-8, UTF-16 or UTF-32.<p>&gt; I personally find it unfortunate that they dictate the storage of it at the API level<p>It is extraordinarily convenient and provides a very transparent way to analyze the performance of string operations.<p>For transcoding, there is the in-progress `encoding` crate: <a href="https:&#x2F;&#x2F;github.com&#x2F;lifthrasiir&#x2F;rust-encoding" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lifthrasiir&#x2F;rust-encoding</a><p>I note that Go does things very similarly (`string` is <i>conventionally</i> UTF-8) and it works famously for them. They have a much more mature set of encoding libraries, but they work the same as the equivalent libraries would work in Rust: transcode to and from UTF-8 at the boundaries. See: <a href="https:&#x2F;&#x2F;godoc.org&#x2F;golang.org&#x2F;x&#x2F;text" rel="nofollow">https:&#x2F;&#x2F;godoc.org&#x2F;golang.org&#x2F;x&#x2F;text</a>