Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/utf_overlong.stp

raw
1 probe begin
2 {
3 // Each string is manually encoded with overlong UTF-8 for 0 and MIN-1,
4 // followed by good MIN and MAX values for that length. string_quoted should
5 // write raw octal for the former and \u-escapes for the latter.
6
7 // <.....0> <....7F> <....80> <...7FF>
8 twos = "\300\200 \301\277 \302\200 \337\277"
9 println(string_quoted(twos))
10
11 // <.........0> <.......7FF> <.......800> <......FFFF>
12 threes = "\340\200\200 \340\237\277 \340\240\200 \357\277\277"
13 println(string_quoted(threes))
14
15 // <.............0> <..........FFFF> <.........10000> <........10FFFF>
16 fours = "\360\200\200\200 \360\217\277\277 \360\220\200\200 \364\217\277\277"
17 println(string_quoted(fours))
18
19 exit()
20 }
21