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
005421 generated/0106 Generated true Seeded random text, mutation: none. 360 B
005422 generated/0107 Generated false Seeded random text, mutation: truncate. 5 B
005423 generated/0108 Generated false Seeded random text, mutation: replace byte. 63 B
005424 generated/0109 Generated false Seeded random text, mutation: replace byte. 21 B
005425 generated/0110 Generated false Seeded random text, mutation: splice bad sequence. 11 B
005426 generated/0111 Generated false Seeded random text, mutation: splice bad sequence. 70 B
005427 generated/0112 Generated true Seeded random text, mutation: none. 134 B
005428 generated/0113 Generated false Seeded random text, mutation: delete byte. 44 B
005429 generated/0114 Generated true Seeded random text, mutation: flip bit. 66 B
005430 generated/0116 Generated false Seeded random text, mutation: truncate. 11 B
005431 generated/0117 Generated true Seeded random text, mutation: none. 71 B
005432 generated/0118 Generated true Seeded random text, mutation: truncate. 23 B
005433 generated/0119 Generated true Seeded random text, mutation: none. 12 B
005434 generated/0120 Generated false Seeded random text, mutation: flip bit. 4 B
005435 generated/0121 Generated true Seeded random text, mutation: none. 284 B
005436 generated/0122 Generated true Seeded random text, mutation: none. 4 B
005437 generated/0123 Generated true Seeded random text, mutation: none. 107 B
005438 generated/0124 Generated true Seeded random text, mutation: none. 41 B
005439 generated/0125 Generated false Seeded random text, mutation: truncate. 9 B
005440 generated/0126 Generated false Seeded random text, mutation: replace byte. 10 B
005441 generated/0127 Generated true Seeded random text, mutation: flip bit. 8 B
005442 generated/0128 Generated true Seeded random text, mutation: none. 3 B
005443 generated/0129 Generated true Seeded random text, mutation: none. 15 B
005444 generated/0130 Generated true Seeded random text, mutation: truncate. 6 B
005445 generated/0131 Generated false Seeded random text, mutation: splice bad sequence. 35 B
005446 generated/0132 Generated false Seeded random text, mutation: replace byte. 15 B
005447 generated/0133 Generated true Seeded random text, mutation: flip bit. 87 B
005448 generated/0134 Generated true Seeded random text, mutation: none. 13 B
005449 generated/0135 Generated false Seeded random text, mutation: delete byte. 187 B
005450 generated/0136 Generated true Seeded random text, mutation: none. 319 B
005451 generated/0137 Generated false Seeded random text, mutation: insert byte. 81 B
005452 generated/0138 Generated false Seeded random text, mutation: splice bad sequence. 16 B
005453 generated/0139 Generated true Seeded random text, mutation: none. 4 B
005454 generated/0140 Generated true Seeded random text, mutation: none. 12 B
005455 generated/0141 Generated true Seeded random text, mutation: none. 34 B
005456 generated/0142 Generated false Seeded random text, mutation: splice bad sequence. 12 B
005457 generated/0143 Generated false Seeded random text, mutation: truncate. 5 B
005458 generated/0144 Generated true Seeded random text, mutation: none. 4 B
005459 generated/0145 Generated true Seeded random text, mutation: none. 186 B
005460 generated/0146 Generated true Seeded random text, mutation: none. 78 B
005461 generated/0147 Generated true Seeded random text, mutation: none. 19 B
005462 generated/0148 Generated false Seeded random text, mutation: truncate. 7 B
005463 generated/0149 Generated true Seeded random text, mutation: truncate. 15 B
005464 generated/0150 Generated true Seeded random text, mutation: none. 4 B
005465 generated/0151 Generated true Seeded random text, mutation: delete byte. 150 B
005466 generated/0152 Generated true Seeded random text, mutation: none. 78 B
005467 generated/0153 Generated true Seeded random text, mutation: none. 38 B
005468 generated/0154 Generated true Seeded random text, mutation: none. 103 B
005469 generated/0155 Generated true Seeded random text, mutation: flip bit. 10 B
005470 generated/0156 Generated true Seeded random text, mutation: none. 171 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.