On 20/06/2019 22:19, Rowan Collins wrote:
On 20/06/2019 16:36, Mark Randall wrote:
"Hello".substr(1) // would work as expected regardless of encoding
As I always point out when "multi-byte support" or "Unicode support" is
discussed, it's often ambiguous just what should be "expected".
My point is that any attempt to make the language "do the right thing by
default" needs serious thought on what "the right thing" is.
Without a doubt, and I expect people will have terrible flashbacks to
PHP6 discussions when thinking about it. It will require a consensus of
which I have no power to aid or influence.
There does at least seem to be the starting point in that mb_string is
already widely used, and my suggestion that it "work as expected" is
more that it would work as the equivalent mb_string / iconv function would.
mb_strlen returns the number of codepoints for example, I'm not
immediately seeing anything about mb_string supporting Graphemes as the
only reference I could find to their manipulation was The intl extension.
--
Mark Randall
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php