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
1,047 of 7,246 cases · 462 true · 585 false
| Case | Name | Expected | Note | Size |
|---|---|---|---|---|
| 000361 | regression/lead C0 second 41 Focused regression | false | 2 B | |
| 000362 | regression/lead C0 second 7F Focused regression | false | 2 B | |
| 000363 | regression/lead C0 second 8F Focused regression | false | 2 B | |
| 000364 | regression/lead C0 second 90 Focused regression | false | 2 B | |
| 000365 | regression/lead C0 second 9F Focused regression | false | 2 B | |
| 000366 | regression/lead C0 second A0 Focused regression | false | 2 B | |
| 000367 | regression/lead C0 second BF Focused regression | false | 2 B | |
| 000368 | regression/lead C0 second C1 Focused regression | false | 2 B | |
| 000369 | regression/lead C0 second C2 Focused regression | false | 2 B | |
| 000370 | regression/lead C0 second DF Focused regression | false | 2 B | |
| 000371 | regression/lead C0 second E0 Focused regression | false | 2 B | |
| 000372 | regression/lead C0 second ED Focused regression | false | 2 B | |
| 000373 | regression/lead C0 second EF Focused regression | false | 2 B | |
| 000374 | regression/lead C0 second F0 Focused regression | false | 2 B | |
| 000375 | regression/lead C0 second F4 Focused regression | false | 2 B | |
| 000376 | regression/lead C0 second F5 Focused regression | false | 2 B | |
| 000377 | regression/lead C0 second FF Focused regression | false | 2 B | |
| 000378 | regression/lead C1 second 00 Focused regression | false | 2 B | |
| 000379 | regression/lead C1 second 41 Focused regression | false | 2 B | |
| 000380 | regression/lead C1 second 7F Focused regression | false | 2 B | |
| 000381 | regression/lead C1 second 80 Focused regression | false | 2 B | |
| 000382 | regression/lead C1 second 8F Focused regression | false | 2 B | |
| 000383 | regression/lead C1 second 90 Focused regression | false | 2 B | |
| 000384 | regression/lead C1 second 9F Focused regression | false | 2 B | |
| 000385 | regression/lead C1 second A0 Focused regression | false | 2 B | |
| 000386 | regression/lead C1 second C0 Focused regression | false | 2 B | |
| 000387 | regression/lead C1 second C1 Focused regression | false | 2 B | |
| 000388 | regression/lead C1 second C2 Focused regression | false | 2 B | |
| 000389 | regression/lead C1 second DF Focused regression | false | 2 B | |
| 000390 | regression/lead C1 second E0 Focused regression | false | 2 B | |
| 000391 | regression/lead C1 second ED Focused regression | false | 2 B | |
| 000392 | regression/lead C1 second EF Focused regression | false | 2 B | |
| 000393 | regression/lead C1 second F0 Focused regression | false | 2 B | |
| 000394 | regression/lead C1 second F4 Focused regression | false | 2 B | |
| 000395 | regression/lead C1 second F5 Focused regression | false | 2 B | |
| 000396 | regression/lead C1 second FF Focused regression | false | 2 B | |
| 000397 | regression/lead C2 second 00 Focused regression | false | 2 B | |
| 000398 | regression/lead C2 second 41 Focused regression | false | 2 B | |
| 000399 | regression/lead C2 second 7F Focused regression | false | 2 B | |
| 000400 | regression/lead C2 second 8F Focused regression | true | 2 B | |
| 000401 | regression/lead C2 second 90 Focused regression | true | 2 B | |
| 000402 | regression/lead C2 second 9F Focused regression | true | 2 B | |
| 000403 | regression/lead C2 second A0 Focused regression | true | 2 B | |
| 000404 | regression/lead C2 second BF Focused regression | true | 2 B | |
| 000405 | regression/lead C2 second C0 Focused regression | false | 2 B | |
| 000406 | regression/lead C2 second C1 Focused regression | false | 2 B | |
| 000407 | regression/lead C2 second C2 Focused regression | false | 2 B | |
| 000408 | regression/lead C2 second DF Focused regression | false | 2 B | |
| 000409 | regression/lead C2 second E0 Focused regression | false | 2 B | |
| 000410 | regression/lead C2 second ED Focused regression | false | 2 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.
- UTF-8 decoder capability and stress test — Markus Kuhn’s file, the source of the 80 Kuhn cases
-
WPT textdecoder-fatal tests
— what browsers must reject when decoding with
fatal: true - Validating UTF-8 In Less Than One Instruction Per Byte — John Keiser and Daniel Lemire’s vectorised algorithm, which simdutf uses