From 59d53ab0a38fd0ab9fcd1bb568eb71c20a06d945 Mon Sep 17 00:00:00 2001 From: popcoder565 Date: Fri, 9 Oct 2026 16:24:22 +0000 Subject: [PATCH] Use ASCII quotes in character literal examples in p1964 (#7938) The examples in the "Types" section of the character literals proposal delimited character literals with typographic quotes (U+2018/U+2019) instead of ASCII `'`, so copying them produces invalid Carbon. No other Markdown file in the repository has typographic quotes inside code. Fixes #7424 Assisted-by: Claude Code with Claude Opus 5.5 Co-authored-by: popcoder565 <339285150+popcoder565@users.noreply.github.com> --- proposals/p001964-character-literals.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proposals/p001964-character-literals.md b/proposals/p001964-character-literals.md index 179d637dba10..ca5a62160a86 100644 --- a/proposals/p001964-character-literals.md +++ b/proposals/p001964-character-literals.md @@ -147,25 +147,25 @@ are examples of character literals for each specific type: `let allowed: Char8 = 'a'` -In this example, the character literal `’a’` corresponds to the Unicode code +In this example, the character literal `'a'` corresponds to the Unicode code point `97`, which is within the valid range of `Char8` since `97` is less than or equal to `0x7F`. - `Char16`: The character literal represents a Unicode code point that can be represented within 16 bits. Here’s an example: -`let smiley: Char16 = ‘\u{1F600}’` +`let smiley: Char16 = '\u{1F600}'` -The character literal `’\u{1F600}’` represents the smiley face emoji, which has +The character literal `'\u{1F600}'` represents the smiley face emoji, which has the Unicode code point `128512`. Since `128512` can be represented within 16 bits, it can be assigned to a variable of type `Char16`. - `Char32`: This character type allows the representation of Unicode code points within 32 bits. Here’s an example: -`let musicalNote: Char32 = ‘🎵’` +`let musicalNote: Char32 = '🎵'` -In this case, the character literal `’🎵’` corresponds to the musical note emoji +In this case, the character literal `'🎵'` corresponds to the musical note emoji with the Unicode code point `127925`. Since `127925` falls within the range that can be represented by `Char32`, it can be assigned to a variable of type `Char32`.