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 |
|---|---|---|---|---|
| 004586 | regression/U+00E9 ending 58 bytes Focused regression | true | 58 B | |
| 004589 | regression/C3 ending 59 bytes Focused regression | false | 59 B | |
| 004596 | regression/U+00E9 ending 59 bytes Focused regression | true | 59 B | |
| 004599 | regression/C3 ending 60 bytes Focused regression | false | 60 B | |
| 004606 | regression/U+00E9 ending 60 bytes Focused regression | true | 60 B | |
| 004609 | regression/C3 ending 61 bytes Focused regression | false | 61 B | |
| 004616 | regression/U+00E9 ending 61 bytes Focused regression | true | 61 B | |
| 004619 | regression/C3 ending 62 bytes Focused regression | false | 62 B | |
| 004626 | regression/U+00E9 ending 62 bytes Focused regression | true | 62 B | |
| 004629 | regression/C3 ending 63 bytes Focused regression | false | 63 B | |
| 004636 | regression/U+00E9 ending 63 bytes Focused regression | true | 63 B | |
| 004639 | regression/C3 ending 64 bytes Focused regression | false | 64 B | |
| 004646 | regression/U+00E9 ending 64 bytes Focused regression | true | 64 B | |
| 004649 | regression/C3 ending 65 bytes Focused regression | false | 65 B | |
| 004656 | regression/U+00E9 ending 65 bytes Focused regression | true | 65 B | |
| 004659 | regression/C3 ending 66 bytes Focused regression | false | 66 B | |
| 004666 | regression/U+00E9 ending 66 bytes Focused regression | true | 66 B | |
| 004669 | regression/C3 ending 67 bytes Focused regression | false | 67 B | |
| 004676 | regression/U+00E9 ending 67 bytes Focused regression | true | 67 B | |
| 004679 | regression/C3 ending 68 bytes Focused regression | false | 68 B | |
| 004686 | regression/U+00E9 ending 68 bytes Focused regression | true | 68 B | |
| 004689 | regression/C3 ending 69 bytes Focused regression | false | 69 B | |
| 004696 | regression/U+00E9 ending 69 bytes Focused regression | true | 69 B | |
| 004699 | regression/C3 ending 70 bytes Focused regression | false | 70 B | |
| 004706 | regression/U+00E9 ending 70 bytes Focused regression | true | 70 B | |
| 004709 | regression/C3 ending 71 bytes Focused regression | false | 71 B | |
| 004716 | regression/U+00E9 ending 71 bytes Focused regression | true | 71 B | |
| 004719 | regression/C3 ending 72 bytes Focused regression | false | 72 B | |
| 004726 | regression/U+00E9 ending 72 bytes Focused regression | true | 72 B | |
| 004729 | regression/C3 ending 73 bytes Focused regression | false | 73 B | |
| 004736 | regression/U+00E9 ending 73 bytes Focused regression | true | 73 B | |
| 004739 | regression/C3 ending 74 bytes Focused regression | false | 74 B | |
| 004746 | regression/U+00E9 ending 74 bytes Focused regression | true | 74 B | |
| 004749 | regression/C3 ending 75 bytes Focused regression | false | 75 B | |
| 004756 | regression/U+00E9 ending 75 bytes Focused regression | true | 75 B | |
| 004759 | regression/C3 ending 76 bytes Focused regression | false | 76 B | |
| 004766 | regression/U+00E9 ending 76 bytes Focused regression | true | 76 B | |
| 004769 | regression/C3 ending 77 bytes Focused regression | false | 77 B | |
| 004776 | regression/U+00E9 ending 77 bytes Focused regression | true | 77 B | |
| 004779 | regression/C3 ending 78 bytes Focused regression | false | 78 B | |
| 004786 | regression/U+00E9 ending 78 bytes Focused regression | true | 78 B | |
| 004789 | regression/C3 ending 79 bytes Focused regression | false | 79 B | |
| 004796 | regression/U+00E9 ending 79 bytes Focused regression | true | 79 B | |
| 004799 | regression/C3 ending 80 bytes Focused regression | false | 80 B | |
| 004806 | regression/U+00E9 ending 80 bytes Focused regression | true | 80 B | |
| 004809 | regression/C3 ending 81 bytes Focused regression | false | 81 B | |
| 004816 | regression/U+00E9 ending 81 bytes Focused regression | true | 81 B | |
| 004819 | regression/C3 ending 82 bytes Focused regression | false | 82 B | |
| 004826 | regression/U+00E9 ending 82 bytes Focused regression | true | 82 B | |
| 004829 | regression/C3 ending 83 bytes Focused regression | false | 83 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