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
007021 generated/1764 Generated false Seeded random text, mutation: insert byte. 12 B
007022 generated/1765 Generated true Seeded random text, mutation: none. 7 B
007023 generated/1766 Generated true Seeded random text, mutation: truncate. 14 B
007024 generated/1767 Generated false Seeded random text, mutation: replace byte. 17 B
007025 generated/1768 Generated false Seeded random text, mutation: flip bit. 56 B
007026 generated/1769 Generated true Seeded random text, mutation: none. 19 B
007027 generated/1770 Generated true Seeded random text, mutation: none. 58 B
007028 generated/1771 Generated true Seeded random text, mutation: delete byte. 15 B
007029 generated/1772 Generated false Seeded random text, mutation: replace byte. 52 B
007030 generated/1773 Generated false Seeded random text, mutation: truncate. 15 B
007031 generated/1774 Generated false Seeded random text, mutation: insert byte. 192 B
007032 generated/1776 Generated true Seeded random text, mutation: replace byte. 11 B
007033 generated/1777 Generated true Seeded random text, mutation: replace byte. 227 B
007034 generated/1778 Generated true Seeded random text, mutation: none. 6 B
007035 generated/1779 Generated true Seeded random text, mutation: flip bit. 13 B
007036 generated/1780 Generated true Seeded random text, mutation: none. 8 B
007037 generated/1781 Generated false Seeded random text, mutation: splice bad sequence. 34 B
007038 generated/1782 Generated false Seeded random text, mutation: splice bad sequence. 14 B
007039 generated/1783 Generated false Seeded random text, mutation: replace byte. 222 B
007040 generated/1784 Generated false Seeded random text, mutation: splice bad sequence. 170 B
007041 generated/1785 Generated false Seeded random text, mutation: truncate. 42 B
007042 generated/1786 Generated false Seeded random text, mutation: delete byte. 22 B
007043 generated/1787 Generated true Seeded random text, mutation: none. 65 B
007044 generated/1788 Generated false Seeded random text, mutation: replace byte. 63 B
007045 generated/1789 Generated true Seeded random text, mutation: none. 216 B
007046 generated/1790 Generated true Seeded random text, mutation: none. 140 B
007047 generated/1791 Generated true Seeded random text, mutation: none. 346 B
007048 generated/1792 Generated true Seeded random text, mutation: none. 298 B
007049 generated/1793 Generated false Seeded random text, mutation: splice bad sequence. 35 B
007050 generated/1794 Generated false Seeded random text, mutation: splice bad sequence. 270 B
007051 generated/1795 Generated false Seeded random text, mutation: insert byte. 326 B
007052 generated/1796 Generated true Seeded random text, mutation: none. 12 B
007053 generated/1797 Generated true Seeded random text, mutation: none. 67 B
007054 generated/1798 Generated false Seeded random text, mutation: insert byte. 19 B
007055 generated/1799 Generated true Seeded random text, mutation: none. 365 B
007056 generated/1800 Generated true Seeded random text, mutation: none. 74 B
007057 generated/1801 Generated false Seeded random text, mutation: splice bad sequence. 9 B
007058 generated/1802 Generated false Seeded random text, mutation: replace byte. 290 B
007059 generated/1803 Generated false Seeded random text, mutation: insert byte. 78 B
007060 generated/1804 Generated false Seeded random text, mutation: replace byte. 16 B
007061 generated/1805 Generated true Seeded random text, mutation: none. 265 B
007062 generated/1806 Generated true Seeded random text, mutation: none. 264 B
007063 generated/1807 Generated false Seeded random text, mutation: replace byte. 7 B
007064 generated/1808 Generated false Seeded random text, mutation: delete byte. 113 B
007065 generated/1809 Generated true Seeded random text, mutation: none. 66 B
007066 generated/1810 Generated false Seeded random text, mutation: truncate. 2 B
007067 generated/1811 Generated true Seeded random text, mutation: none. 59 B
007068 generated/1812 Generated true Seeded random text, mutation: truncate. 62 B
007069 generated/1813 Generated true Seeded random text, mutation: none. 245 B
007070 generated/1814 Generated true Seeded random text, mutation: none. 6 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.