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
005471 generated/0157 Generated true Seeded random text, mutation: flip bit. 8 B
005472 generated/0158 Generated true Seeded random text, mutation: none. 8 B
005473 generated/0159 Generated true Seeded random text, mutation: none. 166 B
005474 generated/0160 Generated true Seeded random text, mutation: none. 95 B
005475 generated/0161 Generated true Seeded random text, mutation: none. 52 B
005476 generated/0162 Generated true Seeded random text, mutation: none. 86 B
005477 generated/0163 Generated true Seeded random text, mutation: none. 399 B
005478 generated/0164 Generated false Seeded random text, mutation: replace byte. 74 B
005479 generated/0165 Generated true Seeded random text, mutation: none. 224 B
005480 generated/0166 Generated true Seeded random text, mutation: none. 15 B
005481 generated/0167 Generated false Seeded random text, mutation: flip bit. 8 B
005482 generated/0168 Generated true Seeded random text, mutation: delete byte. 5 B
005483 generated/0169 Generated false Seeded random text, mutation: truncate. 181 B
005484 generated/0170 Generated true Seeded random text, mutation: truncate. 49 B
005485 generated/0171 Generated true Seeded random text, mutation: none. 310 B
005486 generated/0172 Generated false Seeded random text, mutation: splice bad sequence. 23 B
005487 generated/0173 Generated false Seeded random text, mutation: insert byte. 208 B
005488 generated/0174 Generated true Seeded random text, mutation: none. 15 B
005489 generated/0175 Generated true Seeded random text, mutation: none. 33 B
005490 generated/0176 Generated false Seeded random text, mutation: splice bad sequence. 14 B
005491 generated/0177 Generated false Seeded random text, mutation: splice bad sequence. 135 B
005492 generated/0178 Generated false Seeded random text, mutation: truncate. 356 B
005493 generated/0179 Generated true Seeded random text, mutation: none. 343 B
005494 generated/0180 Generated false Seeded random text, mutation: splice bad sequence. 69 B
005495 generated/0181 Generated false Seeded random text, mutation: replace byte. 250 B
005496 generated/0182 Generated false Seeded random text, mutation: flip bit. 7 B
005497 generated/0183 Generated true Seeded random text, mutation: flip bit. 15 B
005498 generated/0184 Generated true Seeded random text, mutation: flip bit. 27 B
005499 generated/0185 Generated true Seeded random text, mutation: none. 84 B
005500 generated/0186 Generated false Seeded random text, mutation: insert byte. 29 B
005501 generated/0187 Generated true Seeded random text, mutation: none. 303 B
005502 generated/0188 Generated false Seeded random text, mutation: flip bit. 6 B
005503 generated/0189 Generated true Seeded random text, mutation: none. 179 B
005504 generated/0190 Generated true Seeded random text, mutation: replace byte. 238 B
005505 generated/0191 Generated true Seeded random text, mutation: none. 6 B
005506 generated/0192 Generated true Seeded random text, mutation: flip bit. 16 B
005507 generated/0193 Generated true Seeded random text, mutation: none. 247 B
005508 generated/0194 Generated false Seeded random text, mutation: truncate. 160 B
005509 generated/0195 Generated false Seeded random text, mutation: insert byte. 294 B
005510 generated/0196 Generated false Seeded random text, mutation: delete byte. 215 B
005511 generated/0197 Generated false Seeded random text, mutation: delete byte. 12 B
005512 generated/0198 Generated false Seeded random text, mutation: truncate. 115 B
005513 generated/0199 Generated false Seeded random text, mutation: splice bad sequence. 88 B
005514 generated/0200 Generated true Seeded random text, mutation: replace byte. 53 B
005515 generated/0201 Generated false Seeded random text, mutation: delete byte. 54 B
005516 generated/0202 Generated false Seeded random text, mutation: delete byte. 11 B
005517 generated/0203 Generated true Seeded random text, mutation: none. 305 B
005518 generated/0204 Generated false Seeded random text, mutation: insert byte. 336 B
005519 generated/0205 Generated false Seeded random text, mutation: delete byte. 31 B
005520 generated/0206 Generated true Seeded random text, mutation: none. 7 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.