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
005821 generated/0513 Generated true Seeded random text, mutation: none. 67 B
005822 generated/0514 Generated false Seeded random text, mutation: replace byte. 47 B
005823 generated/0515 Generated false Seeded random text, mutation: insert byte. 153 B
005824 generated/0516 Generated false Seeded random text, mutation: splice bad sequence. 43 B
005825 generated/0517 Generated false Seeded random text, mutation: splice bad sequence. 148 B
005826 generated/0518 Generated true Seeded random text, mutation: delete byte. 47 B
005827 generated/0519 Generated false Seeded random text, mutation: replace byte. 246 B
005828 generated/0520 Generated false Seeded random text, mutation: insert byte. 10 B
005829 generated/0521 Generated false Seeded random text, mutation: splice bad sequence. 320 B
005830 generated/0522 Generated true Seeded random text, mutation: none. 33 B
005831 generated/0523 Generated false Seeded random text, mutation: splice bad sequence. 17 B
005832 generated/0524 Generated true Seeded random text, mutation: flip bit. 105 B
005833 generated/0525 Generated true Seeded random text, mutation: none. 48 B
005834 generated/0526 Generated true Seeded random text, mutation: none. 106 B
005835 generated/0527 Generated false Seeded random text, mutation: delete byte. 260 B
005836 generated/0530 Generated true Seeded random text, mutation: truncate. 23 B
005837 generated/0531 Generated true Seeded random text, mutation: none. 313 B
005838 generated/0532 Generated true Seeded random text, mutation: none. 68 B
005839 generated/0534 Generated true Seeded random text, mutation: none. 15 B
005840 generated/0535 Generated true Seeded random text, mutation: none. 379 B
005841 generated/0536 Generated true Seeded random text, mutation: none. 69 B
005842 generated/0537 Generated true Seeded random text, mutation: none. 76 B
005843 generated/0538 Generated true Seeded random text, mutation: flip bit. 15 B
005844 generated/0539 Generated true Seeded random text, mutation: none. 346 B
005845 generated/0540 Generated true Seeded random text, mutation: flip bit. 361 B
005846 generated/0541 Generated true Seeded random text, mutation: none. 263 B
005847 generated/0542 Generated false Seeded random text, mutation: insert byte. 20 B
005848 generated/0543 Generated false Seeded random text, mutation: delete byte. 66 B
005849 generated/0544 Generated false Seeded random text, mutation: splice bad sequence. 7 B
005850 generated/0545 Generated false Seeded random text, mutation: delete byte. 9 B
005851 generated/0546 Generated true Seeded random text, mutation: none. 185 B
005852 generated/0547 Generated false Seeded random text, mutation: splice bad sequence. 16 B
005853 generated/0548 Generated false Seeded random text, mutation: replace byte. 48 B
005854 generated/0549 Generated true Seeded random text, mutation: none. 335 B
005855 generated/0550 Generated true Seeded random text, mutation: none. 8 B
005856 generated/0551 Generated false Seeded random text, mutation: insert byte. 4 B
005857 generated/0552 Generated false Seeded random text, mutation: splice bad sequence. 82 B
005858 generated/0553 Generated true Seeded random text, mutation: none. 52 B
005859 generated/0554 Generated true Seeded random text, mutation: none. 367 B
005860 generated/0555 Generated true Seeded random text, mutation: replace byte. 50 B
005861 generated/0556 Generated false Seeded random text, mutation: flip bit. 78 B
005862 generated/0557 Generated true Seeded random text, mutation: none. 91 B
005863 generated/0558 Generated false Seeded random text, mutation: truncate. 5 B
005864 generated/0560 Generated true Seeded random text, mutation: none. 87 B
005865 generated/0561 Generated true Seeded random text, mutation: delete byte. 61 B
005866 generated/0562 Generated false Seeded random text, mutation: delete byte. 6 B
005867 generated/0563 Generated false Seeded random text, mutation: insert byte. 13 B
005868 generated/0564 Generated true Seeded random text, mutation: none. 293 B
005869 generated/0565 Generated false Seeded random text, mutation: insert byte. 12 B
005870 generated/0566 Generated true Seeded random text, mutation: none. 41 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.