You are right . Extensions should use string/unicode keys (not binary). However now you should use add_ascii_assoc_...() functions instead of add_assoc_...() to make autoconversion work. This is probably the only change that patch makes in extensions.
Dmitry, > -----Original Message----- > From: Derick Rethans [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 20, 2006 12:59 AM > To: Dmitry Stogov > Cc: 'Dmitry Stogov'; php-cvs@lists.php.net > Subject: RE: [PHP-CVS] cvs: php-src /ext/date php_date.c > /ext/dom node.c /ext/filter logical_filters.c /ext/session > session.c /ext/simplexml simplexml.c /ext/soap php_encoding.c > php_packet_soap.c soap.c /ext/sqlite sqlite.c /ext/standard > > > On Tue, 19 Sep 2006, Dmitry Stogov wrote: > > > As you remember, on PDM we deside to remove IS_BINARY data type and > > change symantic of IS_STRING to IS_BINARY in unicode mode. > This patch > > is long delayed finalization of planned change. PHP array should be > > able to have unicode and binary keys, and binary values > shouldn't be > > converted to unicode. > > > > $ php -d "unicode.semantics=1" -r 'var_dump(array(b"foo"=>b"foo", > > "bar"=>bar));' > > > > Removing this autoconversion makes programmer's life little > bit more > > difficult. :( > > Yes, I remember... but there is no reason why our internal > keys should > be defined as binaries. The idea was that you *could* have binary > strings as keys to make the hash lookups quicker (as we'd > only need to > store one hash for each key). I still think that all our extensions > should use strings (unicode) as key as that is most likely > what people > will expect running in unicode mode. Atleast I would expect > it, as it's > somewhat the same currently semantically. > > regards, > Derick > > -- > Derick Rethans > http://derickrethans.nl | http://ez.no | http://xdebug.org > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php