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
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
005900 generated/0596 Generated true Seeded random text, mutation: none. 23 B
005901 generated/0597 Generated true Seeded random text, mutation: none. 5 B
005902 generated/0598 Generated false Seeded random text, mutation: flip bit. 28 B
005903 generated/0599 Generated false Seeded random text, mutation: replace byte. 61 B
005904 generated/0600 Generated true Seeded random text, mutation: none. 280 B
005905 generated/0601 Generated true Seeded random text, mutation: none. 8 B
005906 generated/0602 Generated true Seeded random text, mutation: none. 32 B
005907 generated/0603 Generated true Seeded random text, mutation: none. 28 B
005908 generated/0604 Generated true Seeded random text, mutation: none. 10 B
005909 generated/0605 Generated true Seeded random text, mutation: none. 398 B
005910 generated/0606 Generated false Seeded random text, mutation: insert byte. 6 B
005911 generated/0607 Generated true Seeded random text, mutation: none. 399 B
005912 generated/0608 Generated true Seeded random text, mutation: none. 80 B
005913 generated/0610 Generated true Seeded random text, mutation: flip bit. 64 B
005914 generated/0611 Generated true Seeded random text, mutation: truncate. 133 B
005915 generated/0612 Generated false Seeded random text, mutation: truncate. 9 B
005916 generated/0613 Generated true Seeded random text, mutation: none. 369 B
005917 generated/0614 Generated true Seeded random text, mutation: flip bit. 302 B
005918 generated/0615 Generated true Seeded random text, mutation: none. 55 B
005919 generated/0616 Generated true Seeded random text, mutation: flip bit. 183 B
005920 generated/0617 Generated true Seeded random text, mutation: truncate. 236 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.