Re: Re: mbstring

From: Date: Tue, 03 Sep 2002 08:20:52 +0000
Subject: Re: Re: mbstring
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-87850@lists.php.net to get a copy of this message
On Tue, 3 Sep 2002, Zeev Suraski wrote: > At 10:25 03/09/2002, derick@php.net wrote: > > > strlen() overloaded by mb_strlen might causes some problems because it > > > is used to measure length of string and to measure length of binary > > > data. So, a new function to measure string length only (or binary > > > length only) will be necessary. > > > >Sure, I don't think that will be a problem. > > I do. strlen() should go on returning the binary length, breaking that is > really a bad idea. We can introduce a new function altogether that returns > the 'calculated' MB aware length, that won't cause any problems. strlen -> stringlength... I think this should count the number of characters in a string, not the binary length. It would be nice if this function (strlen) would be transparent with mb things too, as no code needs to be changed then. Derick --------------------------------------------------------------------------- Did I help you? http://www.derickrethans.nl/link.php?url=giftlist Frequent ranting: http://www.derickrethans.nl/ --------------------------------------------------------------------------- PHP: Scripting the Web - derick@php.net All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net ---------------------------------------------------------------------------

« previous php.dev (#87850) next »