Unicode validation range

Thiago Macieira thiago at kde.org
Sat Feb 6 09:28:54 PST 2010


Hello

dbus/dbus-string.c contains this code:

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

I'm trying to understand why we reject the FDD0-FDEF range. This has been 
causing problems in some applications leading to even remote-crashable (app 
receives UTF-8 string from network, app sends such string via D-Bus, D-Bus 
disconnects unexepectedly, crash).

I'm proposing we either:

1) remove the unnecessary checks and allow those characters in

or
2) update the list, to include FFFE, 1FFFE, 1FFFF, 2FFFE, 2FFFF, etc.

I'd rather we did 1.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20100206/9f818ddf/attachment.pgp 


More information about the dbus mailing list