[unicode] Non-characters are allowed in Unicode strings

https://www.unicode.org/faq/private_use.html#nonchar_codes

Fixes https://github.com/harfbuzz/harfbuzz/issues/3590
This commit is contained in:
Behdad Esfahbod 2022-05-18 17:35:38 -06:00
parent e562ff757b
commit b41cfe3fe0

View file

@ -99,9 +99,7 @@
#define UNICODE_VALID(Char) \
((Char) < 0x110000 && \
(((Char) & 0xFFFFF800) != 0xD800) && \
((Char) < 0xFDD0 || (Char) > 0xFDEF) && \
((Char) & 0xFFFE) != 0xFFFE)
(((Char) & 0xFFFFF800) != 0xD800))
static const char utf8_skip_data[256] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,