Compliance cases

These are the 7,246 inputs a submission must answer. A conforming implementation returns true for the 2,791 valid ones and false for the 4,455 invalid ones. You can run the suite without reading it, or open any case to see its input and where its first ill-formed byte is.

Well-formed means Table 3-7 of the Unicode Standard, as RFC 3629 restates it: no overlong forms, surrogates, code points above U+10FFFF, stray continuation bytes or sequences cut short. The compliance suite combines Markus Kuhn's UTF-8 stress test, WPT's fatal TextDecoder tests, every lead byte against the edges of its allowed ranges, errors at every offset around 16-, 32- and 64-byte blocks and at the end of every length up to 130 bytes, large inputs, and seeded random text. simdutf, Python and a Table 3-7 reference agree on every answer.

Run the full compliance suite locally. Replace your-component.wasm with your compiled component. Download the suite

curl -fLo validate_utf8.comply.wasm https://calculated.world/comply/validate_utf8.wasm
npx qipok your-component.wasm --suite validate_utf8.comply.wasm
Clear

1,925 of 7,246 cases · 1,057 true · 868 false

Case Name Expected Note Size
006421 generated/1140 Generated true Seeded random text, mutation: none. 45 B
006422 generated/1141 Generated false Seeded random text, mutation: delete byte. 73 B
006423 generated/1142 Generated false Seeded random text, mutation: insert byte. 330 B
006424 generated/1143 Generated true Seeded random text, mutation: none. 12 B
006425 generated/1144 Generated true Seeded random text, mutation: none. 66 B
006426 generated/1145 Generated true Seeded random text, mutation: flip bit. 379 B
006427 generated/1146 Generated true Seeded random text, mutation: none. 327 B
006428 generated/1147 Generated true Seeded random text, mutation: none. 40 B
006429 generated/1148 Generated true Seeded random text, mutation: none. 26 B
006430 generated/1149 Generated false Seeded random text, mutation: delete byte. 269 B
006431 generated/1150 Generated false Seeded random text, mutation: insert byte. 238 B
006432 generated/1151 Generated true Seeded random text, mutation: delete byte. 319 B
006433 generated/1152 Generated true Seeded random text, mutation: none. 54 B
006434 generated/1153 Generated true Seeded random text, mutation: none. 16 B
006435 generated/1154 Generated false Seeded random text, mutation: splice bad sequence. 320 B
006436 generated/1155 Generated true Seeded random text, mutation: flip bit. 14 B
006437 generated/1156 Generated false Seeded random text, mutation: delete byte. 222 B
006438 generated/1157 Generated false Seeded random text, mutation: replace byte. 309 B
006439 generated/1158 Generated true Seeded random text, mutation: none. 28 B
006440 generated/1159 Generated true Seeded random text, mutation: replace byte. 92 B
006441 generated/1160 Generated true Seeded random text, mutation: truncate. 5 B
006442 generated/1161 Generated true Seeded random text, mutation: none. 68 B
006443 generated/1162 Generated false Seeded random text, mutation: insert byte. 7 B
006444 generated/1163 Generated true Seeded random text, mutation: none. 377 B
006445 generated/1164 Generated false Seeded random text, mutation: splice bad sequence. 76 B
006446 generated/1165 Generated true Seeded random text, mutation: none. 77 B
006447 generated/1166 Generated true Seeded random text, mutation: none. 137 B
006448 generated/1167 Generated false Seeded random text, mutation: replace byte. 78 B
006449 generated/1168 Generated false Seeded random text, mutation: delete byte. 77 B
006450 generated/1169 Generated true Seeded random text, mutation: flip bit. 9 B
006451 generated/1170 Generated false Seeded random text, mutation: delete byte. 9 B
006452 generated/1171 Generated false Seeded random text, mutation: truncate. 12 B
006453 generated/1172 Generated true Seeded random text, mutation: none. 23 B
006454 generated/1173 Generated true Seeded random text, mutation: replace byte. 379 B
006455 generated/1174 Generated true Seeded random text, mutation: delete byte. 32 B
006456 generated/1175 Generated false Seeded random text, mutation: flip bit. 65 B
006457 generated/1176 Generated true Seeded random text, mutation: none. 79 B
006458 generated/1177 Generated true Seeded random text, mutation: none. 9 B
006459 generated/1178 Generated false Seeded random text, mutation: replace byte. 3 B
006460 generated/1179 Generated false Seeded random text, mutation: flip bit. 17 B
006461 generated/1180 Generated false Seeded random text, mutation: delete byte. 213 B
006462 generated/1181 Generated true Seeded random text, mutation: truncate. 15 B
006463 generated/1182 Generated true Seeded random text, mutation: none. 52 B
006464 generated/1183 Generated false Seeded random text, mutation: truncate. 48 B
006465 generated/1184 Generated true Seeded random text, mutation: none. 76 B
006466 generated/1186 Generated true Seeded random text, mutation: none. 4 B
006467 generated/1187 Generated true Seeded random text, mutation: delete byte. 265 B
006468 generated/1188 Generated true Seeded random text, mutation: delete byte. 7 B
006469 generated/1189 Generated true Seeded random text, mutation: none. 52 B
006470 generated/1190 Generated true Seeded random text, mutation: none. 13 B

Where these rules come from

Well-formed UTF-8 is defined by Table 3-7 of the Unicode Standard, chapter 3 , which RFC 3629 restates as ABNF. Every answer is agreed by simdutf 9.4.0, Python’s strict codec and a direct reading of the table; the suite’s own tests add Node.js’s buffer.isUtf8 and a fatal TextDecoder.