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 |
|---|---|---|---|---|
| 004336 | regression/U+00E9 ending 33 bytes Focused regression | true | 33 B | |
| 004339 | regression/C3 ending 34 bytes Focused regression | false | 34 B | |
| 004346 | regression/U+00E9 ending 34 bytes Focused regression | true | 34 B | |
| 004349 | regression/C3 ending 35 bytes Focused regression | false | 35 B | |
| 004356 | regression/U+00E9 ending 35 bytes Focused regression | true | 35 B | |
| 004359 | regression/C3 ending 36 bytes Focused regression | false | 36 B | |
| 004366 | regression/U+00E9 ending 36 bytes Focused regression | true | 36 B | |
| 004369 | regression/C3 ending 37 bytes Focused regression | false | 37 B | |
| 004376 | regression/U+00E9 ending 37 bytes Focused regression | true | 37 B | |
| 004379 | regression/C3 ending 38 bytes Focused regression | false | 38 B | |
| 004386 | regression/U+00E9 ending 38 bytes Focused regression | true | 38 B | |
| 004389 | regression/C3 ending 39 bytes Focused regression | false | 39 B | |
| 004396 | regression/U+00E9 ending 39 bytes Focused regression | true | 39 B | |
| 004399 | regression/C3 ending 40 bytes Focused regression | false | 40 B | |
| 004406 | regression/U+00E9 ending 40 bytes Focused regression | true | 40 B | |
| 004409 | regression/C3 ending 41 bytes Focused regression | false | 41 B | |
| 004416 | regression/U+00E9 ending 41 bytes Focused regression | true | 41 B | |
| 004419 | regression/C3 ending 42 bytes Focused regression | false | 42 B | |
| 004426 | regression/U+00E9 ending 42 bytes Focused regression | true | 42 B | |
| 004429 | regression/C3 ending 43 bytes Focused regression | false | 43 B | |
| 004436 | regression/U+00E9 ending 43 bytes Focused regression | true | 43 B | |
| 004439 | regression/C3 ending 44 bytes Focused regression | false | 44 B | |
| 004446 | regression/U+00E9 ending 44 bytes Focused regression | true | 44 B | |
| 004449 | regression/C3 ending 45 bytes Focused regression | false | 45 B | |
| 004456 | regression/U+00E9 ending 45 bytes Focused regression | true | 45 B | |
| 004459 | regression/C3 ending 46 bytes Focused regression | false | 46 B | |
| 004466 | regression/U+00E9 ending 46 bytes Focused regression | true | 46 B | |
| 004469 | regression/C3 ending 47 bytes Focused regression | false | 47 B | |
| 004476 | regression/U+00E9 ending 47 bytes Focused regression | true | 47 B | |
| 004479 | regression/C3 ending 48 bytes Focused regression | false | 48 B | |
| 004486 | regression/U+00E9 ending 48 bytes Focused regression | true | 48 B | |
| 004489 | regression/C3 ending 49 bytes Focused regression | false | 49 B | |
| 004496 | regression/U+00E9 ending 49 bytes Focused regression | true | 49 B | |
| 004499 | regression/C3 ending 50 bytes Focused regression | false | 50 B | |
| 004506 | regression/U+00E9 ending 50 bytes Focused regression | true | 50 B | |
| 004509 | regression/C3 ending 51 bytes Focused regression | false | 51 B | |
| 004516 | regression/U+00E9 ending 51 bytes Focused regression | true | 51 B | |
| 004519 | regression/C3 ending 52 bytes Focused regression | false | 52 B | |
| 004526 | regression/U+00E9 ending 52 bytes Focused regression | true | 52 B | |
| 004529 | regression/C3 ending 53 bytes Focused regression | false | 53 B | |
| 004536 | regression/U+00E9 ending 53 bytes Focused regression | true | 53 B | |
| 004539 | regression/C3 ending 54 bytes Focused regression | false | 54 B | |
| 004546 | regression/U+00E9 ending 54 bytes Focused regression | true | 54 B | |
| 004549 | regression/C3 ending 55 bytes Focused regression | false | 55 B | |
| 004556 | regression/U+00E9 ending 55 bytes Focused regression | true | 55 B | |
| 004559 | regression/C3 ending 56 bytes Focused regression | false | 56 B | |
| 004566 | regression/U+00E9 ending 56 bytes Focused regression | true | 56 B | |
| 004569 | regression/C3 ending 57 bytes Focused regression | false | 57 B | |
| 004576 | regression/U+00E9 ending 57 bytes Focused regression | true | 57 B | |
| 004579 | regression/C3 ending 58 bytes Focused regression | false | 58 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