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
247 of 7,246 cases · 126 true · 121 false
| Case | Name | Expected | Note | Size |
|---|---|---|---|---|
| 000302 | regression/single byte CD Focused regression | false | 1 B | |
| 000303 | regression/single byte CE Focused regression | false | 1 B | |
| 000304 | regression/single byte CF Focused regression | false | 1 B | |
| 000305 | regression/single byte D0 Focused regression | false | 1 B | |
| 000306 | regression/single byte D1 Focused regression | false | 1 B | |
| 000307 | regression/single byte D2 Focused regression | false | 1 B | |
| 000308 | regression/single byte D3 Focused regression | false | 1 B | |
| 000309 | regression/single byte D4 Focused regression | false | 1 B | |
| 000310 | regression/single byte D5 Focused regression | false | 1 B | |
| 000311 | regression/single byte D6 Focused regression | false | 1 B | |
| 000312 | regression/single byte D7 Focused regression | false | 1 B | |
| 000313 | regression/single byte D8 Focused regression | false | 1 B | |
| 000314 | regression/single byte D9 Focused regression | false | 1 B | |
| 000315 | regression/single byte DA Focused regression | false | 1 B | |
| 000316 | regression/single byte DB Focused regression | false | 1 B | |
| 000317 | regression/single byte DC Focused regression | false | 1 B | |
| 000318 | regression/single byte DD Focused regression | false | 1 B | |
| 000319 | regression/single byte DE Focused regression | false | 1 B | |
| 000320 | regression/single byte E1 Focused regression | false | 1 B | |
| 000321 | regression/single byte E2 Focused regression | false | 1 B | |
| 000322 | regression/single byte E3 Focused regression | false | 1 B | |
| 000323 | regression/single byte E4 Focused regression | false | 1 B | |
| 000324 | regression/single byte E5 Focused regression | false | 1 B | |
| 000325 | regression/single byte E6 Focused regression | false | 1 B | |
| 000326 | regression/single byte E7 Focused regression | false | 1 B | |
| 000327 | regression/single byte E8 Focused regression | false | 1 B | |
| 000328 | regression/single byte E9 Focused regression | false | 1 B | |
| 000329 | regression/single byte EA Focused regression | false | 1 B | |
| 000330 | regression/single byte EB Focused regression | false | 1 B | |
| 000331 | regression/single byte EC Focused regression | false | 1 B | |
| 000332 | regression/single byte ED Focused regression | false | 1 B | |
| 000333 | regression/single byte EE Focused regression | false | 1 B | |
| 000334 | regression/single byte EF Focused regression | false | 1 B | |
| 000335 | regression/single byte F0 Focused regression | false | 1 B | |
| 000336 | regression/single byte F1 Focused regression | false | 1 B | |
| 000337 | regression/single byte F2 Focused regression | false | 1 B | |
| 000338 | regression/single byte F3 Focused regression | false | 1 B | |
| 000339 | regression/single byte F4 Focused regression | false | 1 B | |
| 000340 | regression/single byte F5 Focused regression | false | 1 B | |
| 000341 | regression/single byte F6 Focused regression | false | 1 B | |
| 000342 | regression/single byte F7 Focused regression | false | 1 B | |
| 000343 | regression/single byte F8 Focused regression | false | 1 B | |
| 000344 | regression/single byte F9 Focused regression | false | 1 B | |
| 000345 | regression/single byte FA Focused regression | false | 1 B | |
| 000346 | regression/single byte FB Focused regression | false | 1 B | |
| 000347 | regression/single byte FC Focused regression | false | 1 B | |
| 000348 | regression/single byte FD Focused regression | false | 1 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