Skip to content

Commit b66abe3

Browse files
committed
utf8.h: Include Perl extended UTF-8 in two #defines
Perl extended UTF-8 is beyond any UTF-8 that was ever in any standard. Unicode UTF-8 stops at U+10FFFF, but earlier standards went up to 7FFF_FFFF. Perl allows any code point that fits in a 64-bit word. When one specifies to exclude anything above 10FFFF, one is automatically excluding Perl extended UTF-8. But it is more convenient for future commits to have it explicitly added to the definitions.
1 parent c347076 commit b66abe3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

utf8.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,8 +1178,9 @@ point's representation.
11781178

11791179
/* C9 refers to Unicode Corrigendum #9: allows but discourages non-chars */
11801180
#define UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE \
1181-
(UTF8_DISALLOW_SUPER|UTF8_DISALLOW_SURROGATE)
1182-
#define UTF8_WARN_ILLEGAL_C9_INTERCHANGE (UTF8_WARN_SUPER|UTF8_WARN_SURROGATE)
1181+
(UTF8_DISALLOW_SUPER|UTF8_DISALLOW_PERL_EXTENDED|UTF8_DISALLOW_SURROGATE)
1182+
#define UTF8_WARN_ILLEGAL_C9_INTERCHANGE \
1183+
(UTF8_WARN_SUPER|UTF8_WARN_PERL_EXTENDED|UTF8_WARN_SURROGATE)
11831184

11841185
#define UTF8_DISALLOW_ILLEGAL_INTERCHANGE \
11851186
(UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE|UTF8_DISALLOW_NONCHAR)

0 commit comments

Comments
 (0)