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
006921 generated/1663 Generated false Seeded random text, mutation: splice bad sequence. 25 B
006922 generated/1664 Generated false Seeded random text, mutation: replace byte. 242 B
006923 generated/1665 Generated false Seeded random text, mutation: replace byte. 8 B
006924 generated/1666 Generated false Seeded random text, mutation: insert byte. 8 B
006925 generated/1667 Generated false Seeded random text, mutation: splice bad sequence. 21 B
006926 generated/1668 Generated true Seeded random text, mutation: none. 4 B
006927 generated/1669 Generated true Seeded random text, mutation: none. 139 B
006928 generated/1670 Generated true Seeded random text, mutation: none. 301 B
006929 generated/1671 Generated true Seeded random text, mutation: none. 188 B
006930 generated/1672 Generated true Seeded random text, mutation: none. 346 B
006931 generated/1673 Generated false Seeded random text, mutation: truncate. 68 B
006932 generated/1674 Generated true Seeded random text, mutation: delete byte. 9 B
006933 generated/1675 Generated true Seeded random text, mutation: none. 59 B
006934 generated/1676 Generated false Seeded random text, mutation: delete byte. 6 B
006935 generated/1677 Generated true Seeded random text, mutation: truncate. 12 B
006936 generated/1678 Generated true Seeded random text, mutation: none. 97 B
006937 generated/1679 Generated true Seeded random text, mutation: none. 74 B
006938 generated/1680 Generated true Seeded random text, mutation: none. 333 B
006939 generated/1681 Generated true Seeded random text, mutation: flip bit. 13 B
006940 generated/1682 Generated true Seeded random text, mutation: truncate. 4 B
006941 generated/1683 Generated true Seeded random text, mutation: none. 40 B
006942 generated/1684 Generated true Seeded random text, mutation: none. 42 B
006943 generated/1685 Generated true Seeded random text, mutation: none. 105 B
006944 generated/1686 Generated true Seeded random text, mutation: none. 20 B
006945 generated/1687 Generated false Seeded random text, mutation: truncate. 6 B
006946 generated/1688 Generated false Seeded random text, mutation: delete byte. 376 B
006947 generated/1689 Generated true Seeded random text, mutation: none. 21 B
006948 generated/1690 Generated true Seeded random text, mutation: none. 22 B
006949 generated/1691 Generated false Seeded random text, mutation: truncate. 5 B
006950 generated/1693 Generated false Seeded random text, mutation: truncate. 2 B
006951 generated/1694 Generated false Seeded random text, mutation: flip bit. 8 B
006952 generated/1695 Generated false Seeded random text, mutation: insert byte. 97 B
006953 generated/1696 Generated true Seeded random text, mutation: none. 130 B
006954 generated/1697 Generated false Seeded random text, mutation: replace byte. 274 B
006955 generated/1698 Generated true Seeded random text, mutation: none. 255 B
006956 generated/1699 Generated true Seeded random text, mutation: none. 7 B
006957 generated/1700 Generated true Seeded random text, mutation: none. 65 B
006958 generated/1701 Generated false Seeded random text, mutation: replace byte. 8 B
006959 generated/1702 Generated true Seeded random text, mutation: none. 16 B
006960 generated/1703 Generated true Seeded random text, mutation: flip bit. 72 B
006961 generated/1704 Generated false Seeded random text, mutation: splice bad sequence. 314 B
006962 generated/1705 Generated false Seeded random text, mutation: replace byte. 15 B
006963 generated/1706 Generated false Seeded random text, mutation: replace byte. 103 B
006964 generated/1707 Generated true Seeded random text, mutation: none. 12 B
006965 generated/1708 Generated true Seeded random text, mutation: none. 4 B
006966 generated/1709 Generated true Seeded random text, mutation: truncate. 3 B
006967 generated/1710 Generated false Seeded random text, mutation: insert byte. 95 B
006968 generated/1711 Generated false Seeded random text, mutation: insert byte. 31 B
006969 generated/1712 Generated true Seeded random text, mutation: none. 12 B
006970 generated/1713 Generated false Seeded random text, mutation: insert byte. 73 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.