New draft of nonchar spec

10 views
Skip to first unread message

John Cowan

unread,
Jun 30, 2026, 11:35:51 AM (14 days ago) Jun 30
to scheme-re...@googlegroups.com
I have rewritten the nonchar spec to handle unpaired surrogates of the form Dpqr as U+FDD0 U+FDEp U+FDEq U+FDEr, which cannot be confused with a nonchar pair, because a byte of the form 0y is always ASCII. Please review https://codeberg.org/scheme/r7rs/wiki/Noncharacter-error-handling

Peter McGoron

unread,
Jun 30, 2026, 2:24:09 PM (14 days ago) Jun 30
to scheme-re...@googlegroups.com
> If the encoding is a UTF-16 or UTF-32 variant[...]

UTF-32 also has to contend with invalid data in the high bytes of a 32
bit number. So I would remove the comments about UTF-32 until/unless the
rest of the spec deals with all cases of invalid UTF-32.

-- Peter McGoron

John Cowan

unread,
Jun 30, 2026, 3:29:52 PM (13 days ago) Jun 30
to scheme-re...@googlegroups.com


On Tue, Jun 30, 2026, 2:24 PM 'Peter McGoron' via scheme-reports-wg2 <scheme-re...@googlegroups.com> wrote:

 > If the encoding is a UTF-16 or UTF-32 variant[...]

UTF-32 also has to contend with invalid data in the high bytes of a 32
bit number. 

Good catch. I have added prose to decode invalid 4-byte codepoints as U+FDD1 followed by 8 U+FDEs characters.
Reply all
Reply to author
Forward
0 new messages