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,169 of 7,246 cases · 9 true · 1,160 false
| Case | Name | Expected | Note | Size |
|---|---|---|---|---|
| 000079 | kuhn/3.4 Markus Kuhn’s UTF-8 stress test | false | 30 B | |
| 000100 | wpt/incomplete sequence Web Platform Tests | false | 2 B | |
| 001889 | regression/truncated BOM Focused regression | false | 2 B | |
| 001901 | regression/text English cut short Focused regression | true | 43 B | |
| 001903 | regression/text French cut short Focused regression | true | 80 B | |
| 001904 | regression/text French with a broken character Focused regression | false | 81 B | |
| 001906 | regression/text German cut short Focused regression | true | 62 B | |
| 001907 | regression/text German with a broken character Focused regression | false | 63 B | |
| 001909 | regression/text Polish cut short Focused regression | true | 77 B | |
| 001910 | regression/text Polish with a broken character Focused regression | false | 78 B | |
| 001912 | regression/text Greek cut short Focused regression | true | 63 B | |
| 001913 | regression/text Greek with a broken character Focused regression | false | 64 B | |
| 001915 | regression/text Russian cut short Focused regression | true | 102 B | |
| 001916 | regression/text Russian with a broken character Focused regression | false | 103 B | |
| 001918 | regression/text Hebrew cut short Focused regression | true | 65 B | |
| 001919 | regression/text Hebrew with a broken character Focused regression | false | 66 B | |
| 001921 | regression/text Arabic cut short Focused regression | true | 89 B | |
| 001922 | regression/text Arabic with a broken character Focused regression | false | 90 B | |
| 001924 | regression/text Hindi cut short Focused regression | false | 254 B | |
| 001925 | regression/text Hindi with a broken character Focused regression | false | 255 B | |
| 001927 | regression/text Thai cut short Focused regression | false | 168 B | |
| 001928 | regression/text Thai with a broken character Focused regression | false | 169 B | |
| 001930 | regression/text Chinese cut short Focused regression | false | 59 B | |
| 001931 | regression/text Chinese with a broken character Focused regression | false | 60 B | |
| 001933 | regression/text Japanese cut short Focused regression | false | 107 B | |
| 001934 | regression/text Japanese with a broken character Focused regression | false | 108 B | |
| 001936 | regression/text Korean cut short Focused regression | true | 93 B | |
| 001937 | regression/text Korean with a broken character Focused regression | false | 94 B | |
| 001939 | regression/text Emoji cut short Focused regression | false | 107 B | |
| 001940 | regression/text Emoji with a broken character Focused regression | false | 108 B | |
| 001942 | regression/text Combining cut short Focused regression | false | 48 B | |
| 001943 | regression/text Combining with a broken character Focused regression | false | 49 B | |
| 001945 | regression/text Math cut short Focused regression | false | 72 B | |
| 001946 | regression/text Math with a broken character Focused regression | false | 73 B | |
| 001950 | regression/C3 A9 repeated then C3 Focused regression | false | 4.0 KiB | |
| 001951 | regression/lead bytes only Focused regression | false | 51 B | |
| 002989 | regression/C3 then ASCII at 0 in ASCII Focused regression | false | 128 B | |
| 002990 | regression/C3 then ASCII at 1 in ASCII Focused regression | false | 128 B | |
| 002991 | regression/C3 then ASCII at 12 in ASCII Focused regression | false | 128 B | |
| 002992 | regression/C3 then ASCII at 13 in ASCII Focused regression | false | 128 B | |
| 002993 | regression/C3 then ASCII at 14 in ASCII Focused regression | false | 128 B | |
| 002994 | regression/C3 then ASCII at 15 in ASCII Focused regression | false | 128 B | |
| 002995 | regression/C3 then ASCII at 16 in ASCII Focused regression | false | 128 B | |
| 002996 | regression/C3 then ASCII at 17 in ASCII Focused regression | false | 128 B | |
| 002997 | regression/C3 then ASCII at 28 in ASCII Focused regression | false | 128 B | |
| 002998 | regression/C3 then ASCII at 29 in ASCII Focused regression | false | 128 B | |
| 002999 | regression/C3 then ASCII at 30 in ASCII Focused regression | false | 128 B | |
| 003000 | regression/C3 then ASCII at 31 in ASCII Focused regression | false | 128 B | |
| 003001 | regression/C3 then ASCII at 32 in ASCII Focused regression | false | 128 B | |
| 003002 | regression/C3 then ASCII at 33 in ASCII Focused regression | false | 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