From cac0641a54c29d82771e766a7e74b8dbb63aad45 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Wed, 28 Dec 2022 09:32:28 +0100 Subject: [PATCH] Mention that strings are UTF-8 encoded Technically, it's the Rust source file that is UTF-8 encoded, but in practical terms, this means that the string literals are UTF-8 encoded. It's only if you start using non-ASCII identifiers that you end up with UTF-8 encoded text outside of a string literal. Fixes #35. --- src/hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hello-world.md b/src/hello-world.md index 6c53af6e..90988d46 100644 --- a/src/hello-world.md +++ b/src/hello-world.md @@ -15,4 +15,4 @@ What you see: * Blocks are delimited by curly braces like in C and C++. * The `main` function is the entry point of the program. * Rust has hygienic macros, `println!` is an example of this. -* Rust strings can contain Unicode characters, such as emoji. +* Rust strings are UTF-8 encoded and can contain any Unicode character.