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
Clear

1,925 of 7,246 cases · 1,057 true · 868 false

Case Name Expected Note Size
006271 generated/0983 Generated true Seeded random text, mutation: none. 60 B
006272 generated/0984 Generated false Seeded random text, mutation: delete byte. 3 B
006273 generated/0985 Generated true Seeded random text, mutation: none. 340 B
006274 generated/0986 Generated false Seeded random text, mutation: delete byte. 6 B
006275 generated/0987 Generated true Seeded random text, mutation: none. 165 B
006276 generated/0988 Generated true Seeded random text, mutation: none. 16 B
006277 generated/0989 Generated true Seeded random text, mutation: none. 219 B
006278 generated/0990 Generated true Seeded random text, mutation: none. 82 B
006279 generated/0991 Generated true Seeded random text, mutation: flip bit. 5 B
006280 generated/0992 Generated false Seeded random text, mutation: flip bit. 380 B
006281 generated/0993 Generated true Seeded random text, mutation: none. 79 B
006282 generated/0994 Generated true Seeded random text, mutation: none. 3 B
006283 generated/0995 Generated true Seeded random text, mutation: none. 4 B
006284 generated/0996 Generated false Seeded random text, mutation: truncate. 30 B
006285 generated/0997 Generated false Seeded random text, mutation: delete byte. 91 B
006286 generated/0998 Generated true Seeded random text, mutation: replace byte. 61 B
006287 generated/0999 Generated true Seeded random text, mutation: none. 396 B
006288 generated/1000 Generated true Seeded random text, mutation: none. 29 B
006289 generated/1001 Generated true Seeded random text, mutation: flip bit. 11 B
006290 generated/1002 Generated false Seeded random text, mutation: insert byte. 120 B
006291 generated/1003 Generated false Seeded random text, mutation: delete byte. 3 B
006292 generated/1004 Generated true Seeded random text, mutation: none. 356 B
006293 generated/1005 Generated true Seeded random text, mutation: none. 9 B
006294 generated/1006 Generated false Seeded random text, mutation: insert byte. 50 B
006295 generated/1007 Generated false Seeded random text, mutation: splice bad sequence. 27 B
006296 generated/1008 Generated true Seeded random text, mutation: flip bit. 60 B
006297 generated/1009 Generated true Seeded random text, mutation: none. 60 B
006298 generated/1010 Generated false Seeded random text, mutation: flip bit. 7 B
006299 generated/1011 Generated true Seeded random text, mutation: flip bit. 76 B
006300 generated/1012 Generated true Seeded random text, mutation: none. 200 B
006301 generated/1013 Generated false Seeded random text, mutation: delete byte. 3 B
006302 generated/1014 Generated true Seeded random text, mutation: none. 64 B
006303 generated/1015 Generated false Seeded random text, mutation: splice bad sequence. 70 B
006304 generated/1016 Generated true Seeded random text, mutation: truncate. 17 B
006305 generated/1017 Generated false Seeded random text, mutation: insert byte. 66 B
006306 generated/1018 Generated true Seeded random text, mutation: none. 5 B
006307 generated/1019 Generated true Seeded random text, mutation: none. 15 B
006308 generated/1020 Generated false Seeded random text, mutation: splice bad sequence. 49 B
006309 generated/1021 Generated true Seeded random text, mutation: none. 85 B
006310 generated/1022 Generated true Seeded random text, mutation: none. 7 B
006311 generated/1023 Generated true Seeded random text, mutation: none. 6 B
006312 generated/1024 Generated true Seeded random text, mutation: none. 27 B
006313 generated/1025 Generated false Seeded random text, mutation: insert byte. 69 B
006314 generated/1026 Generated true Seeded random text, mutation: none. 42 B
006315 generated/1027 Generated false Seeded random text, mutation: flip bit. 8 B
006316 generated/1028 Generated true Seeded random text, mutation: none. 395 B
006317 generated/1029 Generated false Seeded random text, mutation: splice bad sequence. 18 B
006318 generated/1030 Generated true Seeded random text, mutation: flip bit. 71 B
006319 generated/1031 Generated true Seeded random text, mutation: none. 59 B
006320 generated/1032 Generated false Seeded random text, mutation: insert byte. 74 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.