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
005771 generated/0460 Generated true Seeded random text, mutation: none. 8 B
005772 generated/0461 Generated false Seeded random text, mutation: replace byte. 73 B
005773 generated/0462 Generated true Seeded random text, mutation: truncate. 41 B
005774 generated/0463 Generated false Seeded random text, mutation: replace byte. 5 B
005775 generated/0465 Generated false Seeded random text, mutation: replace byte. 20 B
005776 generated/0466 Generated false Seeded random text, mutation: insert byte. 346 B
005777 generated/0468 Generated false Seeded random text, mutation: splice bad sequence. 9 B
005778 generated/0469 Generated true Seeded random text, mutation: none. 8 B
005779 generated/0470 Generated false Seeded random text, mutation: truncate. 10 B
005780 generated/0471 Generated false Seeded random text, mutation: delete byte. 11 B
005781 generated/0472 Generated false Seeded random text, mutation: splice bad sequence. 4 B
005782 generated/0473 Generated true Seeded random text, mutation: none. 73 B
005783 generated/0474 Generated true Seeded random text, mutation: replace byte. 16 B
005784 generated/0475 Generated true Seeded random text, mutation: none. 114 B
005785 generated/0476 Generated true Seeded random text, mutation: none. 396 B
005786 generated/0477 Generated true Seeded random text, mutation: none. 6 B
005787 generated/0478 Generated true Seeded random text, mutation: none. 2 B
005788 generated/0479 Generated true Seeded random text, mutation: delete byte. 191 B
005789 generated/0480 Generated true Seeded random text, mutation: none. 197 B
005790 generated/0481 Generated false Seeded random text, mutation: splice bad sequence. 20 B
005791 generated/0482 Generated false Seeded random text, mutation: replace byte. 4 B
005792 generated/0483 Generated false Seeded random text, mutation: splice bad sequence. 358 B
005793 generated/0484 Generated true Seeded random text, mutation: replace byte. 204 B
005794 generated/0485 Generated true Seeded random text, mutation: replace byte. 44 B
005795 generated/0487 Generated false Seeded random text, mutation: insert byte. 68 B
005796 generated/0488 Generated true Seeded random text, mutation: none. 14 B
005797 generated/0489 Generated true Seeded random text, mutation: flip bit. 333 B
005798 generated/0490 Generated true Seeded random text, mutation: none. 13 B
005799 generated/0491 Generated true Seeded random text, mutation: flip bit. 4 B
005800 generated/0492 Generated false Seeded random text, mutation: splice bad sequence. 17 B
005801 generated/0493 Generated true Seeded random text, mutation: none. 75 B
005802 generated/0494 Generated true Seeded random text, mutation: none. 14 B
005803 generated/0495 Generated true Seeded random text, mutation: truncate. 10 B
005804 generated/0496 Generated false Seeded random text, mutation: insert byte. 73 B
005805 generated/0497 Generated true Seeded random text, mutation: flip bit. 4 B
005806 generated/0498 Generated true Seeded random text, mutation: replace byte. 50 B
005807 generated/0499 Generated true Seeded random text, mutation: none. 64 B
005808 generated/0500 Generated false Seeded random text, mutation: replace byte. 44 B
005809 generated/0501 Generated true Seeded random text, mutation: truncate. 104 B
005810 generated/0502 Generated true Seeded random text, mutation: none. 52 B
005811 generated/0503 Generated true Seeded random text, mutation: truncate. 48 B
005812 generated/0504 Generated true Seeded random text, mutation: replace byte. 69 B
005813 generated/0505 Generated true Seeded random text, mutation: none. 15 B
005814 generated/0506 Generated false Seeded random text, mutation: insert byte. 17 B
005815 generated/0507 Generated true Seeded random text, mutation: none. 206 B
005816 generated/0508 Generated true Seeded random text, mutation: replace byte. 71 B
005817 generated/0509 Generated true Seeded random text, mutation: flip bit. 75 B
005818 generated/0510 Generated false Seeded random text, mutation: insert byte. 13 B
005819 generated/0511 Generated true Seeded random text, mutation: none. 54 B
005820 generated/0512 Generated false Seeded random text, mutation: replace byte. 246 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.