You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/3348-c-str-literal.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Interactions with string related macros:
76
76
For regular string literals, we have this restriction because `&str` is required to be valid UTF-8.
77
77
However, C literals (and objects of our `&CStr` type) aren't necessarily valid UTF-8.
78
78
79
-
* Allowing only ASCII characters rand byte-oriented escape codes (like in `b"…"`, e.g. `\xff` but not `螃蟹` or `\u{1F980}`).
79
+
* Allowing only ASCII characters and byte-oriented escape codes (like in `b"…"`, e.g. `\xff` but not `螃蟹` or `\u{1F980}`).
80
80
81
81
While C literals (and `&CStr`) aren't necessarily valid UTF-8, they often do contain UTF-8 data.
82
82
Refusing to put UTF-8 in it would make the feature less useful and would unnecessarily make it harder to use unicode in programs that mainly use C strings.
0 commit comments