Test "other/str-utf8-surrogates"
Expected: ✋ reject · Size: 556.2 KB · Lines: 10.3 k · lean4export: 3.2.0 · Lean: 4.38.0-nightly-2026-12-03 · 📄 Declaration · 🔗 Source
s : x = y := rfl, where x and y are the surrogates U+D800 and
U+D801 encoded as UTF-8 bytes (ED A0 80 and ED A0 81), which is not valid
UTF-8. A checker that decodes both leniently takes them to be equal and
accepts this.
A string literal denotes a String, a sequence of Unicode scalar values
(code points below 0x110000 that are not surrogates), so an export with
such a literal is malformed and must be rejected.
Generated by invalid-utf8/gen.py from an export of invalid-utf8/Lit.lean.
See Lean issue #16877.