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 |
|---|---|---|---|---|
| 000961 | regression/lead DE second 90 Focused regression | true | 2 B | |
| 000962 | regression/lead DE second 9F Focused regression | true | 2 B | |
| 000963 | regression/lead DE second A0 Focused regression | true | 2 B | |
| 000964 | regression/lead DE second BF Focused regression | true | 2 B | |
| 000965 | regression/lead DE second C0 Focused regression | false | 2 B | |
| 000966 | regression/lead DE second C1 Focused regression | false | 2 B | |
| 000967 | regression/lead DE second C2 Focused regression | false | 2 B | |
| 000968 | regression/lead DE second DF Focused regression | false | 2 B | |
| 000969 | regression/lead DE second E0 Focused regression | false | 2 B | |
| 000970 | regression/lead DE second ED Focused regression | false | 2 B | |
| 000971 | regression/lead DE second EF Focused regression | false | 2 B | |
| 000972 | regression/lead DE second F0 Focused regression | false | 2 B | |
| 000973 | regression/lead DE second F4 Focused regression | false | 2 B | |
| 000974 | regression/lead DE second F5 Focused regression | false | 2 B | |
| 000975 | regression/lead DE second FF Focused regression | false | 2 B | |
| 000976 | regression/lead DF second 00 Focused regression | false | 2 B | |
| 000977 | regression/lead DF second 41 Focused regression | false | 2 B | |
| 000978 | regression/lead DF second 7F Focused regression | false | 2 B | |
| 000979 | regression/lead DF second 80 Focused regression | true | 2 B | |
| 000980 | regression/lead DF second 8F Focused regression | true | 2 B | |
| 000981 | regression/lead DF second 90 Focused regression | true | 2 B | |
| 000982 | regression/lead DF second 9F Focused regression | true | 2 B | |
| 000983 | regression/lead DF second A0 Focused regression | true | 2 B | |
| 000984 | regression/lead DF second C0 Focused regression | false | 2 B | |
| 000985 | regression/lead DF second C1 Focused regression | false | 2 B | |
| 000986 | regression/lead DF second C2 Focused regression | false | 2 B | |
| 000987 | regression/lead DF second DF Focused regression | false | 2 B | |
| 000988 | regression/lead DF second E0 Focused regression | false | 2 B | |
| 000989 | regression/lead DF second ED Focused regression | false | 2 B | |
| 000990 | regression/lead DF second EF Focused regression | false | 2 B | |
| 000991 | regression/lead DF second F0 Focused regression | false | 2 B | |
| 000992 | regression/lead DF second F4 Focused regression | false | 2 B | |
| 000993 | regression/lead DF second F5 Focused regression | false | 2 B | |
| 000994 | regression/lead DF second FF Focused regression | false | 2 B | |
| 001952 | regression/alternating ASCII and 2-byte Focused regression | true | 2.9 KiB | |
| 001953 | regression/alternating 1-, 2-, 3- and 4-byte Focused regression | true | 4.9 KiB | |
| 001954 | regression/U+00E9 at 0 in ASCII Focused regression | true | 128 B | |
| 001955 | regression/U+00E9 at 1 in ASCII Focused regression | true | 128 B | |
| 001956 | regression/U+00E9 at 12 in ASCII Focused regression | true | 128 B | |
| 001957 | regression/U+00E9 at 13 in ASCII Focused regression | true | 128 B | |
| 001958 | regression/U+00E9 at 14 in ASCII Focused regression | true | 128 B | |
| 001959 | regression/U+00E9 at 15 in ASCII Focused regression | true | 128 B | |
| 001960 | regression/U+00E9 at 16 in ASCII Focused regression | true | 128 B | |
| 001961 | regression/U+00E9 at 17 in ASCII Focused regression | true | 128 B | |
| 001962 | regression/U+00E9 at 28 in ASCII Focused regression | true | 128 B | |
| 001963 | regression/U+00E9 at 29 in ASCII Focused regression | true | 128 B | |
| 001964 | regression/U+00E9 at 30 in ASCII Focused regression | true | 128 B | |
| 001965 | regression/U+00E9 at 31 in ASCII Focused regression | true | 128 B | |
| 001966 | regression/U+00E9 at 32 in ASCII Focused regression | true | 128 B | |
| 001967 | regression/U+00E9 at 33 in ASCII 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