Tighten the ranges in wcrtomb(3).
authorbentley <bentley@openbsd.org>
Tue, 13 Oct 2015 02:17:46 +0000 (02:17 +0000)
committerbentley <bentley@openbsd.org>
Tue, 13 Oct 2015 02:17:46 +0000 (02:17 +0000)
commitfdb7d9f4343bf612b5bcf0901babc2ff737822ad
tree2372d98078ba52841ab032acee0a3042a06339a9
parent28190e8af9439e673bdde68df942891737c849be
Tighten the ranges in wcrtomb(3).

By definition, the range of valid Unicode code points is the union of
U+0000..U+D7FF and U+E000..U+10FFFF (see Unicode 8.0.0, chapter 3.9).

In UTF-16, the encoded values that would represent U+D800..U+DFFF are
used for surrogate pairs. UTF-8 has no concept of surrogate pairs;
attempting to treat them as regular code points violates the standard
and makes no sense besides.

ok stsp@
lib/libc/citrus/citrus_utf8.c