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,161 of 7,246 cases · 619 true · 542 false
| Case | Name | Expected | Note | Size |
|---|---|---|---|---|
| 003315 | regression/U+D7FF at 92 in mixed Focused regression | true | 128 B | |
| 003316 | regression/U+D7FF at 96 in mixed Focused regression | true | 128 B | |
| 003317 | regression/U+D7FF at 97 in mixed Focused regression | true | 128 B | |
| 003318 | regression/U+D7FF at 108 in mixed Focused regression | true | 128 B | |
| 003319 | regression/U+D7FF at 109 in mixed Focused regression | true | 128 B | |
| 003320 | regression/U+D7FF at 111 in mixed Focused regression | true | 128 B | |
| 003321 | regression/U+D7FF at 112 in mixed Focused regression | true | 128 B | |
| 003322 | regression/U+D7FF at 113 in mixed Focused regression | true | 128 B | |
| 003323 | regression/U+D7FF at 124 in mixed Focused regression | true | 128 B | |
| 003324 | regression/U+E000 at 0 in mixed Focused regression | true | 128 B | |
| 003325 | regression/U+E000 at 1 in mixed Focused regression | true | 128 B | |
| 003326 | regression/U+E000 at 12 in mixed Focused regression | true | 128 B | |
| 003327 | regression/U+E000 at 13 in mixed Focused regression | true | 128 B | |
| 003328 | regression/U+E000 at 15 in mixed Focused regression | true | 128 B | |
| 003329 | regression/U+E000 at 16 in mixed Focused regression | true | 128 B | |
| 003330 | regression/U+E000 at 17 in mixed Focused regression | true | 128 B | |
| 003331 | regression/U+E000 at 28 in mixed Focused regression | true | 128 B | |
| 003332 | regression/U+E000 at 29 in mixed Focused regression | true | 128 B | |
| 003333 | regression/U+E000 at 32 in mixed Focused regression | true | 128 B | |
| 003334 | regression/U+E000 at 36 in mixed Focused regression | true | 128 B | |
| 003335 | regression/U+E000 at 44 in mixed Focused regression | true | 128 B | |
| 003336 | regression/U+E000 at 48 in mixed Focused regression | true | 128 B | |
| 003337 | regression/U+E000 at 49 in mixed Focused regression | true | 128 B | |
| 003338 | regression/U+E000 at 60 in mixed Focused regression | true | 128 B | |
| 003339 | regression/U+E000 at 61 in mixed Focused regression | true | 128 B | |
| 003340 | regression/U+E000 at 63 in mixed Focused regression | true | 128 B | |
| 003341 | regression/U+E000 at 64 in mixed Focused regression | true | 128 B | |
| 003342 | regression/U+E000 at 65 in mixed Focused regression | true | 128 B | |
| 003343 | regression/U+E000 at 76 in mixed Focused regression | true | 128 B | |
| 003344 | regression/U+E000 at 77 in mixed Focused regression | true | 128 B | |
| 003345 | regression/U+E000 at 80 in mixed Focused regression | true | 128 B | |
| 003346 | regression/U+E000 at 84 in mixed Focused regression | true | 128 B | |
| 003347 | regression/U+E000 at 92 in mixed Focused regression | true | 128 B | |
| 003348 | regression/U+E000 at 96 in mixed Focused regression | true | 128 B | |
| 003349 | regression/U+E000 at 97 in mixed Focused regression | true | 128 B | |
| 003350 | regression/U+E000 at 108 in mixed Focused regression | true | 128 B | |
| 003351 | regression/U+E000 at 109 in mixed Focused regression | true | 128 B | |
| 003352 | regression/U+E000 at 111 in mixed Focused regression | true | 128 B | |
| 003353 | regression/U+E000 at 112 in mixed Focused regression | true | 128 B | |
| 003354 | regression/U+E000 at 113 in mixed Focused regression | true | 128 B | |
| 003355 | regression/U+E000 at 124 in mixed Focused regression | true | 128 B | |
| 003356 | regression/U+FFFF at 0 in mixed Focused regression | true | 128 B | |
| 003357 | regression/U+FFFF at 1 in mixed Focused regression | true | 128 B | |
| 003358 | regression/U+FFFF at 12 in mixed Focused regression | true | 128 B | |
| 003359 | regression/U+FFFF at 13 in mixed Focused regression | true | 128 B | |
| 003360 | regression/U+FFFF at 15 in mixed Focused regression | true | 128 B | |
| 003361 | regression/U+FFFF at 16 in mixed Focused regression | true | 128 B | |
| 003362 | regression/U+FFFF at 17 in mixed Focused regression | true | 128 B | |
| 003363 | regression/U+FFFF at 28 in mixed Focused regression | true | 128 B | |
| 003364 | regression/U+FFFF at 29 in mixed Focused regression | true | 128 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