Unicode validation range

Havoc Pennington havoc.pennington at gmail.com
Sun Feb 14 06:38:05 PST 2010


This macro is presumably from glib (I think I asked whoever wrote it
about copyright, back in the day). The glib macro has changed
slightly:

#define UNICODE_VALID(Char)                   \
    ((Char) < 0x110000 &&                     \
     (((Char) & 0xFFFFF800) != 0xD800) &&     \
     ((Char) < 0xFDD0 || (Char) > 0xFDEF) &&  \
     ((Char) & 0xFFFE) != 0xFFFE)

commit message in glib was "glib/gutf8.c: Fix typo in UNICODE_VALID
(related to #107427)"

-     ((Char) & 0xFFFF) != 0xFFFF)
+     ((Char) & 0xFFFE) != 0xFFFE)

Havoc


More information about the dbus mailing list