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
All 7,246 cases · 2,791 true · 4,455 false
| Case | Name | Expected | Note | Size |
|---|---|---|---|---|
| 005300 | regression/E2 ending 130 bytes Focused regression | false | 130 B | |
| 005301 | regression/F0 9F 98 ending 130 bytes Focused regression | false | 130 B | |
| 005302 | regression/F0 9F ending 130 bytes Focused regression | false | 130 B | |
| 005303 | regression/F4 8F BF ending 130 bytes Focused regression | false | 130 B | |
| 005304 | regression/F0 ending 130 bytes Focused regression | false | 130 B | |
| 005305 | regression/U+00E9 ending 130 bytes Focused regression | true | 130 B | |
| 005306 | regression/U+20AC ending 130 bytes Focused regression | true | 130 B | |
| 005307 | regression/U+1F600 ending 130 bytes Focused regression | true | 130 B | |
| 005308 | regression/every 2-byte scalar Focused regression | true | 3.8 KiB | |
| 005309 | regression/every 3-byte scalar Focused regression | true | 180.0 KiB | |
| 005310 | regression/every 4-byte lead and second byte Focused regression | true | 4.0 KiB | |
| 005311 | regression/4-byte scalars every 61 code points Focused regression | true | 67.1 KiB | |
| 005312 | regression/256 KiB mixed text Focused regression | true | 256.0 KiB | |
| 005313 | regression/256 KiB mixed text, last character cut short Focused regression | false | 256.0 KiB | |
| 005314 | regression/64 KiB ASCII Focused regression | true | 64.0 KiB | |
| 005315 | regression/64 KiB ASCII then 80 Focused regression | false | 64.0 KiB | |
| 005316 | regression/4 KiB ASCII starting with FF Focused regression | false | 4.0 KiB | |
| 005317 | regression/64 KiB CJK Focused regression | true | 64.0 KiB | |
| 005318 | regression/64 KiB CJK with a surrogate in the middle Focused regression | false | 64.0 KiB | |
| 005319 | regression/64 KiB emoji Focused regression | true | 64.0 KiB | |
| 005320 | regression/64 KiB Cyrillic Focused regression | true | 64.0 KiB | |
| 005321 | generated/0000 Generated | true | 3 B | |
| 005322 | generated/0001 Generated | false | 48 B | |
| 005323 | generated/0002 Generated | true | 36 B | |
| 005324 | generated/0003 Generated | false | 4 B | |
| 005325 | generated/0004 Generated | false | 8 B | |
| 005326 | generated/0006 Generated | true | 55 B | |
| 005327 | generated/0007 Generated | true | 388 B | |
| 005328 | generated/0008 Generated | true | 54 B | |
| 005329 | generated/0009 Generated | false | 371 B | |
| 005330 | generated/0010 Generated | true | 180 B | |
| 005331 | generated/0011 Generated | false | 147 B | |
| 005332 | generated/0012 Generated | false | 60 B | |
| 005333 | generated/0013 Generated | false | 68 B | |
| 005334 | generated/0014 Generated | true | 314 B | |
| 005335 | generated/0016 Generated | false | 11 B | |
| 005336 | generated/0017 Generated | true | 70 B | |
| 005337 | generated/0018 Generated | false | 2 B | |
| 005338 | generated/0019 Generated | true | 8 B | |
| 005339 | generated/0020 Generated | true | 68 B | |
| 005340 | generated/0021 Generated | true | 69 B | |
| 005341 | generated/0022 Generated | true | 156 B | |
| 005342 | generated/0023 Generated | true | 348 B | |
| 005343 | generated/0024 Generated | false | 95 B | |
| 005344 | generated/0025 Generated | true | 15 B | |
| 005345 | generated/0026 Generated | false | 43 B | |
| 005346 | generated/0027 Generated | false | 81 B | |
| 005347 | generated/0028 Generated | true | 12 B | |
| 005348 | generated/0029 Generated | true | 4 B | |
| 005349 | generated/0030 Generated | false | 43 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