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
006971 generated/1714 Generated true Seeded random text, mutation: replace byte. 56 B
006972 generated/1715 Generated true Seeded random text, mutation: none. 9 B
006973 generated/1716 Generated false Seeded random text, mutation: splice bad sequence. 152 B
006974 generated/1717 Generated true Seeded random text, mutation: flip bit. 12 B
006975 generated/1718 Generated true Seeded random text, mutation: none. 8 B
006976 generated/1719 Generated false Seeded random text, mutation: delete byte. 240 B
006977 generated/1720 Generated false Seeded random text, mutation: delete byte. 3 B
006978 generated/1721 Generated true Seeded random text, mutation: flip bit. 24 B
006979 generated/1722 Generated false Seeded random text, mutation: splice bad sequence. 84 B
006980 generated/1723 Generated false Seeded random text, mutation: splice bad sequence. 113 B
006981 generated/1724 Generated false Seeded random text, mutation: truncate. 181 B
006982 generated/1725 Generated false Seeded random text, mutation: splice bad sequence. 290 B
006983 generated/1726 Generated true Seeded random text, mutation: none. 293 B
006984 generated/1727 Generated true Seeded random text, mutation: none. 202 B
006985 generated/1728 Generated false Seeded random text, mutation: delete byte. 78 B
006986 generated/1729 Generated false Seeded random text, mutation: splice bad sequence. 57 B
006987 generated/1730 Generated true Seeded random text, mutation: none. 15 B
006988 generated/1731 Generated false Seeded random text, mutation: truncate. 41 B
006989 generated/1732 Generated false Seeded random text, mutation: replace byte. 65 B
006990 generated/1733 Generated false Seeded random text, mutation: splice bad sequence. 71 B
006991 generated/1734 Generated false Seeded random text, mutation: delete byte. 34 B
006992 generated/1735 Generated true Seeded random text, mutation: none. 9 B
006993 generated/1736 Generated true Seeded random text, mutation: truncate. 3 B
006994 generated/1737 Generated false Seeded random text, mutation: splice bad sequence. 387 B
006995 generated/1738 Generated true Seeded random text, mutation: none. 7 B
006996 generated/1739 Generated true Seeded random text, mutation: none. 134 B
006997 generated/1740 Generated false Seeded random text, mutation: delete byte. 40 B
006998 generated/1741 Generated false Seeded random text, mutation: truncate. 364 B
006999 generated/1742 Generated false Seeded random text, mutation: splice bad sequence. 14 B
007000 generated/1743 Generated false Seeded random text, mutation: delete byte. 89 B
007001 generated/1744 Generated true Seeded random text, mutation: none. 6 B
007002 generated/1745 Generated true Seeded random text, mutation: none. 12 B
007003 generated/1746 Generated false Seeded random text, mutation: truncate. 66 B
007004 generated/1747 Generated true Seeded random text, mutation: none. 12 B
007005 generated/1748 Generated true Seeded random text, mutation: none. 388 B
007006 generated/1749 Generated true Seeded random text, mutation: none. 9 B
007007 generated/1750 Generated false Seeded random text, mutation: insert byte. 76 B
007008 generated/1751 Generated true Seeded random text, mutation: truncate. 11 B
007009 generated/1752 Generated false Seeded random text, mutation: splice bad sequence. 54 B
007010 generated/1753 Generated true Seeded random text, mutation: none. 11 B
007011 generated/1754 Generated true Seeded random text, mutation: none. 3 B
007012 generated/1755 Generated false Seeded random text, mutation: splice bad sequence. 75 B
007013 generated/1756 Generated true Seeded random text, mutation: none. 58 B
007014 generated/1757 Generated true Seeded random text, mutation: none. 167 B
007015 generated/1758 Generated false Seeded random text, mutation: truncate. 7 B
007016 generated/1759 Generated false Seeded random text, mutation: delete byte. 14 B
007017 generated/1760 Generated true Seeded random text, mutation: flip bit. 176 B
007018 generated/1761 Generated false Seeded random text, mutation: insert byte. 219 B
007019 generated/1762 Generated true Seeded random text, mutation: none. 168 B
007020 generated/1763 Generated true Seeded random text, mutation: none. 9 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.