From 9254d7a1187700a1a6f15ac35144127bdf9fc7be Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 5 Oct 2022 18:16:32 +0200 Subject: [PATCH 1/2] [format.string.escaped] Fix invalid example Example 5 should only have one invalid code unit. The second code unit is a valid code point. This issue was already in the paper P2286R8 Formatting Ranges --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index abfdbabe88..cc68fc4c05 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15406,7 +15406,7 @@ string s4 = format("[{:?}]", string("\0 \n \t \x02 \x1b", 9)); // \tcode{s4} has value: \tcode{["\textbackslash u\{0\} \textbackslash n \textbackslash t \textbackslash u\{2\} \textbackslash u\{1b\}"]} string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8 - // \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}\textbackslash x\{28\}"]} + // \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}("]} \end{codeblock} \end{example} From 6686c30d58ac3ee3b77b31f58b4e50f1d2b7d887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 10 Oct 2022 11:11:23 +0000 Subject: [PATCH 2/2] unbreak line --- source/utilities.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index cc68fc4c05..c89bdcc2e4 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15405,8 +15405,7 @@ // The following examples assume use of the UTF-8 encoding string s4 = format("[{:?}]", string("\0 \n \t \x02 \x1b", 9)); // \tcode{s4} has value: \tcode{["\textbackslash u\{0\} \textbackslash n \textbackslash t \textbackslash u\{2\} \textbackslash u\{1b\}"]} -string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8 - // \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}("]} +string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8, \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}("]} \end{codeblock} \end{example}