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
005350 generated/0031 Generated false Seeded random text, mutation: flip bit. 276 B
005351 generated/0032 Generated true Seeded random text, mutation: delete byte. 75 B
005352 generated/0033 Generated false Seeded random text, mutation: insert byte. 31 B
005353 generated/0034 Generated false Seeded random text, mutation: insert byte. 9 B
005354 generated/0036 Generated true Seeded random text, mutation: none. 199 B
005355 generated/0037 Generated false Seeded random text, mutation: insert byte. 59 B
005356 generated/0038 Generated false Seeded random text, mutation: splice bad sequence. 60 B
005357 generated/0039 Generated true Seeded random text, mutation: none. 52 B
005358 generated/0040 Generated true Seeded random text, mutation: none. 70 B
005359 generated/0041 Generated true Seeded random text, mutation: none. 31 B
005360 generated/0042 Generated false Seeded random text, mutation: insert byte. 16 B
005361 generated/0044 Generated false Seeded random text, mutation: truncate. 47 B
005362 generated/0045 Generated true Seeded random text, mutation: none. 15 B
005363 generated/0046 Generated true Seeded random text, mutation: replace byte. 193 B
005364 generated/0047 Generated false Seeded random text, mutation: truncate. 2 B
005365 generated/0048 Generated true Seeded random text, mutation: none. 6 B
005366 generated/0049 Generated true Seeded random text, mutation: none. 99 B
005367 generated/0050 Generated false Seeded random text, mutation: replace byte. 245 B
005368 generated/0051 Generated true Seeded random text, mutation: none. 62 B
005369 generated/0052 Generated true Seeded random text, mutation: none. 48 B
005370 generated/0053 Generated true Seeded random text, mutation: none. 74 B
005371 generated/0054 Generated false Seeded random text, mutation: replace byte. 328 B
005372 generated/0055 Generated true Seeded random text, mutation: none. 4 B
005373 generated/0056 Generated true Seeded random text, mutation: delete byte. 23 B
005374 generated/0057 Generated false Seeded random text, mutation: delete byte. 346 B
005375 generated/0058 Generated true Seeded random text, mutation: truncate. 31 B
005376 generated/0060 Generated true Seeded random text, mutation: flip bit. 195 B
005377 generated/0061 Generated false Seeded random text, mutation: replace byte. 135 B
005378 generated/0062 Generated true Seeded random text, mutation: none. 398 B
005379 generated/0063 Generated true Seeded random text, mutation: none. 244 B
005380 generated/0065 Generated true Seeded random text, mutation: none. 348 B
005381 generated/0066 Generated false Seeded random text, mutation: delete byte. 44 B
005382 generated/0067 Generated false Seeded random text, mutation: insert byte. 214 B
005383 generated/0068 Generated true Seeded random text, mutation: none. 53 B
005384 generated/0069 Generated true Seeded random text, mutation: none. 204 B
005385 generated/0070 Generated false Seeded random text, mutation: splice bad sequence. 22 B
005386 generated/0071 Generated true Seeded random text, mutation: none. 14 B
005387 generated/0072 Generated true Seeded random text, mutation: none. 76 B
005388 generated/0073 Generated false Seeded random text, mutation: replace byte. 32 B
005389 generated/0074 Generated false Seeded random text, mutation: insert byte. 30 B
005390 generated/0075 Generated false Seeded random text, mutation: splice bad sequence. 337 B
005391 generated/0076 Generated false Seeded random text, mutation: delete byte. 43 B
005392 generated/0077 Generated false Seeded random text, mutation: replace byte. 21 B
005393 generated/0078 Generated true Seeded random text, mutation: none. 68 B
005394 generated/0079 Generated true Seeded random text, mutation: none. 11 B
005395 generated/0080 Generated false Seeded random text, mutation: splice bad sequence. 19 B
005396 generated/0081 Generated true Seeded random text, mutation: flip bit. 5 B
005397 generated/0082 Generated false Seeded random text, mutation: delete byte. 22 B
005398 generated/0083 Generated true Seeded random text, mutation: truncate. 44 B
005399 generated/0084 Generated false Seeded random text, mutation: splice bad sequence. 13 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.