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

All 7,246 cases · 2,791 true · 4,455 false

Case Name Expected Note Size
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
005871 generated/0567 Generated false Seeded random text, mutation: splice bad sequence. 20 B
005872 generated/0568 Generated true Seeded random text, mutation: truncate. 37 B
005873 generated/0569 Generated true Seeded random text, mutation: none. 14 B
005874 generated/0570 Generated true Seeded random text, mutation: replace byte. 44 B
005875 generated/0571 Generated true Seeded random text, mutation: truncate. 93 B
005876 generated/0572 Generated false Seeded random text, mutation: truncate. 117 B
005877 generated/0573 Generated false Seeded random text, mutation: replace byte. 12 B
005878 generated/0574 Generated true Seeded random text, mutation: none. 243 B
005879 generated/0575 Generated false Seeded random text, mutation: truncate. 94 B
005880 generated/0576 Generated false Seeded random text, mutation: replace byte. 6 B
005881 generated/0577 Generated false Seeded random text, mutation: flip bit. 4 B
005882 generated/0578 Generated true Seeded random text, mutation: truncate. 149 B
005883 generated/0579 Generated true Seeded random text, mutation: truncate. 32 B
005884 generated/0580 Generated true Seeded random text, mutation: none. 186 B
005885 generated/0581 Generated true Seeded random text, mutation: truncate. 145 B
005886 generated/0582 Generated true Seeded random text, mutation: flip bit. 23 B
005887 generated/0583 Generated false Seeded random text, mutation: insert byte. 27 B
005888 generated/0584 Generated true Seeded random text, mutation: flip bit. 24 B
005889 generated/0585 Generated false Seeded random text, mutation: splice bad sequence. 7 B
005890 generated/0586 Generated false Seeded random text, mutation: truncate. 2 B
005891 generated/0587 Generated true Seeded random text, mutation: none. 34 B
005892 generated/0588 Generated false Seeded random text, mutation: truncate. 108 B
005893 generated/0589 Generated false Seeded random text, mutation: replace byte. 326 B
005894 generated/0590 Generated true Seeded random text, mutation: truncate. 4 B
005895 generated/0591 Generated false Seeded random text, mutation: splice bad sequence. 15 B
005896 generated/0592 Generated true Seeded random text, mutation: truncate. 123 B
005897 generated/0593 Generated true Seeded random text, mutation: none. 376 B
005898 generated/0594 Generated false Seeded random text, mutation: truncate. 86 B
005899 generated/0595 Generated true Seeded random text, mutation: delete byte. 262 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.