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
006321 generated/1033 Generated true Seeded random text, mutation: none. 10 B
006322 generated/1035 Generated false Seeded random text, mutation: truncate. 97 B
006323 generated/1036 Generated true Seeded random text, mutation: none. 78 B
006324 generated/1037 Generated false Seeded random text, mutation: splice bad sequence. 117 B
006325 generated/1038 Generated false Seeded random text, mutation: splice bad sequence. 54 B
006326 generated/1039 Generated false Seeded random text, mutation: splice bad sequence. 39 B
006327 generated/1040 Generated true Seeded random text, mutation: flip bit. 6 B
006328 generated/1041 Generated false Seeded random text, mutation: splice bad sequence. 16 B
006329 generated/1043 Generated false Seeded random text, mutation: insert byte. 16 B
006330 generated/1044 Generated false Seeded random text, mutation: insert byte. 33 B
006331 generated/1045 Generated true Seeded random text, mutation: delete byte. 258 B
006332 generated/1046 Generated true Seeded random text, mutation: none. 10 B
006333 generated/1047 Generated true Seeded random text, mutation: flip bit. 18 B
006334 generated/1048 Generated true Seeded random text, mutation: none. 144 B
006335 generated/1049 Generated true Seeded random text, mutation: none. 216 B
006336 generated/1050 Generated true Seeded random text, mutation: none. 4 B
006337 generated/1051 Generated true Seeded random text, mutation: none. 50 B
006338 generated/1052 Generated false Seeded random text, mutation: splice bad sequence. 305 B
006339 generated/1053 Generated true Seeded random text, mutation: none. 50 B
006340 generated/1054 Generated true Seeded random text, mutation: none. 27 B
006341 generated/1055 Generated true Seeded random text, mutation: none. 278 B
006342 generated/1056 Generated false Seeded random text, mutation: splice bad sequence. 28 B
006343 generated/1057 Generated true Seeded random text, mutation: truncate. 157 B
006344 generated/1058 Generated true Seeded random text, mutation: none. 61 B
006345 generated/1059 Generated false Seeded random text, mutation: truncate. 157 B
006346 generated/1062 Generated true Seeded random text, mutation: none. 159 B
006347 generated/1063 Generated true Seeded random text, mutation: none. 10 B
006348 generated/1064 Generated true Seeded random text, mutation: none. 11 B
006349 generated/1065 Generated false Seeded random text, mutation: splice bad sequence. 17 B
006350 generated/1066 Generated false Seeded random text, mutation: replace byte. 2 B
006351 generated/1067 Generated false Seeded random text, mutation: splice bad sequence. 90 B
006352 generated/1068 Generated true Seeded random text, mutation: flip bit. 9 B
006353 generated/1069 Generated true Seeded random text, mutation: none. 15 B
006354 generated/1070 Generated false Seeded random text, mutation: truncate. 63 B
006355 generated/1071 Generated true Seeded random text, mutation: none. 19 B
006356 generated/1072 Generated false Seeded random text, mutation: truncate. 32 B
006357 generated/1073 Generated true Seeded random text, mutation: flip bit. 224 B
006358 generated/1074 Generated true Seeded random text, mutation: none. 52 B
006359 generated/1075 Generated true Seeded random text, mutation: none. 327 B
006360 generated/1076 Generated false Seeded random text, mutation: splice bad sequence. 13 B
006361 generated/1078 Generated true Seeded random text, mutation: replace byte. 81 B
006362 generated/1079 Generated true Seeded random text, mutation: none. 6 B
006363 generated/1080 Generated false Seeded random text, mutation: splice bad sequence. 257 B
006364 generated/1081 Generated true Seeded random text, mutation: none. 12 B
006365 generated/1082 Generated true Seeded random text, mutation: flip bit. 217 B
006366 generated/1083 Generated true Seeded random text, mutation: none. 241 B
006367 generated/1084 Generated false Seeded random text, mutation: insert byte. 61 B
006368 generated/1085 Generated true Seeded random text, mutation: none. 18 B
006369 generated/1086 Generated true Seeded random text, mutation: none. 207 B
006370 generated/1087 Generated false Seeded random text, mutation: splice bad sequence. 44 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.