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 |
|---|---|---|---|---|
| 001659 | regression/E1 80 third F5 Focused regression | false | 3 B | |
| 001660 | regression/E1 80 third FF Focused regression | false | 3 B | |
| 001661 | regression/ED 9F third 00 Focused regression | false | 3 B | |
| 001662 | regression/ED 9F third 41 Focused regression | false | 3 B | |
| 001663 | regression/ED 9F third 7F Focused regression | false | 3 B | |
| 001664 | regression/ED 9F third 8F Focused regression | true | 3 B | |
| 001665 | regression/ED 9F third 90 Focused regression | true | 3 B | |
| 001666 | regression/ED 9F third 9F Focused regression | true | 3 B | |
| 001667 | regression/ED 9F third A0 Focused regression | true | 3 B | |
| 001668 | regression/ED 9F third C0 Focused regression | false | 3 B | |
| 001669 | regression/ED 9F third C1 Focused regression | false | 3 B | |
| 001670 | regression/ED 9F third C2 Focused regression | false | 3 B | |
| 001671 | regression/ED 9F third DF Focused regression | false | 3 B | |
| 001672 | regression/ED 9F third E0 Focused regression | false | 3 B | |
| 001673 | regression/ED 9F third ED Focused regression | false | 3 B | |
| 001674 | regression/ED 9F third EF Focused regression | false | 3 B | |
| 001675 | regression/ED 9F third F0 Focused regression | false | 3 B | |
| 001676 | regression/ED 9F third F4 Focused regression | false | 3 B | |
| 001677 | regression/ED 9F third F5 Focused regression | false | 3 B | |
| 001678 | regression/ED 9F third FF Focused regression | false | 3 B | |
| 001679 | regression/EE BF third 00 Focused regression | false | 3 B | |
| 001680 | regression/EE BF third 41 Focused regression | false | 3 B | |
| 001681 | regression/EE BF third 7F Focused regression | false | 3 B | |
| 001682 | regression/EE BF third 8F Focused regression | true | 3 B | |
| 001683 | regression/EE BF third 90 Focused regression | true | 3 B | |
| 001684 | regression/EE BF third 9F Focused regression | true | 3 B | |
| 001685 | regression/EE BF third A0 Focused regression | true | 3 B | |
| 001686 | regression/EE BF third BF Focused regression | true | 3 B | |
| 001687 | regression/EE BF third C0 Focused regression | false | 3 B | |
| 001688 | regression/EE BF third C1 Focused regression | false | 3 B | |
| 001689 | regression/EE BF third C2 Focused regression | false | 3 B | |
| 001690 | regression/EE BF third DF Focused regression | false | 3 B | |
| 001691 | regression/EE BF third E0 Focused regression | false | 3 B | |
| 001692 | regression/EE BF third ED Focused regression | false | 3 B | |
| 001693 | regression/EE BF third EF Focused regression | false | 3 B | |
| 001694 | regression/EE BF third F0 Focused regression | false | 3 B | |
| 001695 | regression/EE BF third F4 Focused regression | false | 3 B | |
| 001696 | regression/EE BF third F5 Focused regression | false | 3 B | |
| 001697 | regression/EE BF third FF Focused regression | false | 3 B | |
| 001953 | regression/alternating 1-, 2-, 3- and 4-byte Focused regression | true | 4.9 KiB | |
| 002044 | regression/U+0800 at 0 in ASCII Focused regression | true | 128 B | |
| 002045 | regression/U+0800 at 1 in ASCII Focused regression | true | 128 B | |
| 002046 | regression/U+0800 at 12 in ASCII Focused regression | true | 128 B | |
| 002047 | regression/U+0800 at 13 in ASCII Focused regression | true | 128 B | |
| 002048 | regression/U+0800 at 14 in ASCII Focused regression | true | 128 B | |
| 002049 | regression/U+0800 at 15 in ASCII Focused regression | true | 128 B | |
| 002050 | regression/U+0800 at 16 in ASCII Focused regression | true | 128 B | |
| 002051 | regression/U+0800 at 17 in ASCII Focused regression | true | 128 B | |
| 002052 | regression/U+0800 at 28 in ASCII Focused regression | true | 128 B | |
| 002053 | regression/U+0800 at 29 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