1select collation(cast(0x8140 as char));
2select hex(weight_string(cast(0x6141 as char)));
3select hex(weight_string(cast(0x8140 as char)));
4select hex(weight_string(cast(0x8140 as char) as char(1)));
5select hex(weight_string(cast(0x81408140 as char) as char(1)));
6select hex(weight_string(cast(0x8140 as char) as char(3)));
7select hex(weight_string(cast(0x81408140 as char) as char(3)));
8select hex(weight_string(cast(0x408140 as char) as char(3)));
9select hex(weight_string(cast(0x4081408140 as char) as char(3)));
10select hex(weight_string(cast(0x40814081408140 as char) as char(3)));
11select hex(weight_string(cast(0x4040814081408140 as char) as char(3)));
12
13# Read 2 characters from the source string (the last character is not used)
14select hex(weight_string(cast(0x814081408140 as char), 1, 2, 0xC0));
15select hex(weight_string(cast(0x814081408140 as char), 2, 2, 0xC0));
16select hex(weight_string(cast(0x814081408140 as char), 3, 2, 0xC0));
17select hex(weight_string(cast(0x814081408140 as char), 4, 2, 0xC0));
18select hex(weight_string(cast(0x814081408140 as char), 5, 2, 0xC0));
19select hex(weight_string(cast(0x814081408140 as char),25, 2, 0xC0));
20
21# Read 3 characters from the source string (the entire string is used)
22select hex(weight_string(cast(0x814081408140 as char), 1, 3, 0xC0));
23select hex(weight_string(cast(0x814081408140 as char), 2, 3, 0xC0));
24select hex(weight_string(cast(0x814081408140 as char), 3, 3, 0xC0));
25select hex(weight_string(cast(0x814081408140 as char), 4, 3, 0xC0));
26select hex(weight_string(cast(0x814081408140 as char), 5, 3, 0xC0));
27select hex(weight_string(cast(0x814081408140 as char),25, 3, 0xC0));
28
29# Read 4 characters from the source string (extra space is added)
30select hex(weight_string(cast(0x814081408140 as char), 1, 4, 0xC0));
31select hex(weight_string(cast(0x814081408140 as char), 2, 4, 0xC0));
32select hex(weight_string(cast(0x814081408140 as char), 3, 4, 0xC0));
33select hex(weight_string(cast(0x814081408140 as char), 4, 4, 0xC0));
34select hex(weight_string(cast(0x814081408140 as char), 5, 4, 0xC0));
35select hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0));
36
37