Re: What is the use of "unicode.semantics" in PHP 6?

From: Date: Mon, 09 Jul 2007 22:33:56 +0000
Subject: Re: What is the use of "unicode.semantics" in PHP 6?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  Groups: php.internals 
Request: Send a blank email to internals+get-30707@lists.php.net to get a copy of this message
Do _I_ like that horrible IS_STRING/IS_UNICODE mess we have atm? No.
I don't think there's any way of having both unstructured character data and Unicode text represented without having two distinct types. Either that or you'd have to tell on each step which one it is, and that would suck much more.
I would love to have clean and easy PHP6 without all the "compatibility", which creates gazillion problems to both users and developers.
Fixing unicode=on does not remove the IS_STRING/IS_UNICODE duality. We still have two kinds of data - unstructured bit stream and structured text. If we want strlen("превед") to return 6 - since that Russian word has 6 characters - then we have no way but recognize that it's not just a collection of bits but Unicode text, and that would require separate type, as I see it. And as I see it, this is the source of the problems when people try to operate on text as on bit stream and vice versa. Unless I totally missed what mess you are referring to... -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#30707) next »