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
005521 generated/0207 Generated false Seeded random text, mutation: splice bad sequence. 179 B
005522 generated/0208 Generated true Seeded random text, mutation: none. 66 B
005523 generated/0209 Generated true Seeded random text, mutation: none. 10 B
005524 generated/0210 Generated true Seeded random text, mutation: delete byte. 11 B
005525 generated/0211 Generated false Seeded random text, mutation: insert byte. 5 B
005526 generated/0212 Generated true Seeded random text, mutation: flip bit. 149 B
005527 generated/0213 Generated true Seeded random text, mutation: none. 53 B
005528 generated/0214 Generated true Seeded random text, mutation: none. 28 B
005529 generated/0215 Generated true Seeded random text, mutation: none. 173 B
005530 generated/0216 Generated false Seeded random text, mutation: insert byte. 12 B
005531 generated/0217 Generated true Seeded random text, mutation: none. 344 B
005532 generated/0218 Generated true Seeded random text, mutation: none. 316 B
005533 generated/0219 Generated false Seeded random text, mutation: insert byte. 59 B
005534 generated/0220 Generated false Seeded random text, mutation: replace byte. 307 B
005535 generated/0221 Generated true Seeded random text, mutation: truncate. 37 B
005536 generated/0222 Generated false Seeded random text, mutation: delete byte. 73 B
005537 generated/0223 Generated false Seeded random text, mutation: delete byte. 18 B
005538 generated/0224 Generated false Seeded random text, mutation: insert byte. 79 B
005539 generated/0225 Generated true Seeded random text, mutation: none. 252 B
005540 generated/0226 Generated false Seeded random text, mutation: replace byte. 212 B
005541 generated/0227 Generated true Seeded random text, mutation: flip bit. 62 B
005542 generated/0228 Generated true Seeded random text, mutation: none. 8 B
005543 generated/0229 Generated true Seeded random text, mutation: none. 26 B
005544 generated/0230 Generated true Seeded random text, mutation: none. 11 B
005545 generated/0231 Generated false Seeded random text, mutation: insert byte. 12 B
005546 generated/0232 Generated false Seeded random text, mutation: delete byte. 11 B
005547 generated/0233 Generated false Seeded random text, mutation: replace byte. 4 B
005548 generated/0234 Generated true Seeded random text, mutation: none. 10 B
005549 generated/0235 Generated false Seeded random text, mutation: flip bit. 312 B
005550 generated/0236 Generated true Seeded random text, mutation: none. 3 B
005551 generated/0237 Generated false Seeded random text, mutation: splice bad sequence. 338 B
005552 generated/0238 Generated false Seeded random text, mutation: replace byte. 301 B
005553 generated/0239 Generated true Seeded random text, mutation: none. 6 B
005554 generated/0240 Generated true Seeded random text, mutation: replace byte. 258 B
005555 generated/0241 Generated true Seeded random text, mutation: none. 28 B
005556 generated/0242 Generated true Seeded random text, mutation: none. 28 B
005557 generated/0243 Generated false Seeded random text, mutation: truncate. 10 B
005558 generated/0244 Generated false Seeded random text, mutation: flip bit. 11 B
005559 generated/0245 Generated false Seeded random text, mutation: splice bad sequence. 10 B
005560 generated/0246 Generated true Seeded random text, mutation: none. 12 B
005561 generated/0247 Generated false Seeded random text, mutation: splice bad sequence. 16 B
005562 generated/0248 Generated false Seeded random text, mutation: delete byte. 53 B
005563 generated/0249 Generated true Seeded random text, mutation: none. 6 B
005564 generated/0250 Generated true Seeded random text, mutation: none. 247 B
005565 generated/0251 Generated true Seeded random text, mutation: none. 5 B
005566 generated/0252 Generated false Seeded random text, mutation: delete byte. 79 B
005567 generated/0253 Generated true Seeded random text, mutation: none. 116 B
005568 generated/0254 Generated false Seeded random text, mutation: delete byte. 29 B
005569 generated/0255 Generated true Seeded random text, mutation: none. 4 B
005570 generated/0256 Generated false Seeded random text, mutation: insert byte. 14 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.