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

331 of 7,246 cases · 0 true · 331 false

Case Name Expected Note Size
000046 kuhn/4.1.1 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.1.1. 2 B
000047 kuhn/4.1.2 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.1.2. 3 B
000048 kuhn/4.1.3 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.1.3. 4 B
000049 kuhn/4.1.4 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.1.4. 5 B
000050 kuhn/4.1.5 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.1.5. 6 B
000051 kuhn/4.2.1 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.2.1. 2 B
000052 kuhn/4.2.2 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.2.2. 3 B
000053 kuhn/4.2.3 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.2.3. 4 B
000054 kuhn/4.2.4 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.2.4. 5 B
000055 kuhn/4.2.5 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.2.5. 6 B
000056 kuhn/4.3.1 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.3.1. 2 B
000057 kuhn/4.3.2 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.3.2. 3 B
000058 kuhn/4.3.3 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.3.3. 4 B
000059 kuhn/4.3.4 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.3.4. 5 B
000060 kuhn/4.3.5 Markus Kuhn’s UTF-8 stress test false Kuhn's test 4.3.5. 6 B
001812 regression/overlong U+0041 in 2 bytes Focused regression false U+0041 needs 1 byte(s); C1 81 is overlong. 2 B
001813 regression/overlong U+0041 in 3 bytes Focused regression false U+0041 needs 1 byte(s); E0 81 81 is overlong. 3 B
001814 regression/overlong U+0041 in 4 bytes Focused regression false U+0041 needs 1 byte(s); F0 80 81 81 is overlong. 4 B
001815 regression/overlong U+0080 in 3 bytes Focused regression false U+0080 needs 2 byte(s); E0 82 80 is overlong. 3 B
001816 regression/overlong U+0080 in 4 bytes Focused regression false U+0080 needs 2 byte(s); F0 80 82 80 is overlong. 4 B
001817 regression/overlong U+0800 in 4 bytes Focused regression false U+0800 needs 3 byte(s); F0 80 A0 80 is overlong. 4 B
001818 regression/modified UTF-8 NUL Focused regression false Java's modified UTF-8 writes NUL as C0 80. 4 B
001819 regression/overlong slash Focused regression false The classic path-traversal overlong '/'. 6 B
002584 regression/C0 80 at 0 in ASCII Focused regression false 128 B
002585 regression/C0 80 at 1 in ASCII Focused regression false 128 B
002586 regression/C0 80 at 12 in ASCII Focused regression false 128 B
002587 regression/C0 80 at 13 in ASCII Focused regression false 128 B
002588 regression/C0 80 at 14 in ASCII Focused regression false 128 B
002589 regression/C0 80 at 15 in ASCII Focused regression false 128 B
002590 regression/C0 80 at 16 in ASCII Focused regression false 128 B
002591 regression/C0 80 at 17 in ASCII Focused regression false 128 B
002592 regression/C0 80 at 28 in ASCII Focused regression false 128 B
002593 regression/C0 80 at 29 in ASCII Focused regression false 128 B
002594 regression/C0 80 at 30 in ASCII Focused regression false 128 B
002595 regression/C0 80 at 31 in ASCII Focused regression false 128 B
002596 regression/C0 80 at 32 in ASCII Focused regression false 128 B
002597 regression/C0 80 at 33 in ASCII Focused regression false 128 B
002598 regression/C0 80 at 44 in ASCII Focused regression false 128 B
002599 regression/C0 80 at 45 in ASCII Focused regression false 128 B
002600 regression/C0 80 at 46 in ASCII Focused regression false 128 B
002601 regression/C0 80 at 47 in ASCII Focused regression false 128 B
002602 regression/C0 80 at 48 in ASCII Focused regression false 128 B
002603 regression/C0 80 at 49 in ASCII Focused regression false 128 B
002604 regression/C0 80 at 60 in ASCII Focused regression false 128 B
002605 regression/C0 80 at 61 in ASCII Focused regression false 128 B
002606 regression/C0 80 at 62 in ASCII Focused regression false 128 B
002607 regression/C0 80 at 63 in ASCII Focused regression false 128 B
002608 regression/C0 80 at 64 in ASCII Focused regression false 128 B
002609 regression/C0 80 at 65 in ASCII Focused regression false 128 B
002610 regression/C0 80 at 76 in ASCII Focused regression false 128 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.