RE: [PHP-DEV] Re: strlen() under unicode.semantics

From: Date: Fri, 23 Jun 2006 18:31:37 +0000
Subject: RE: [PHP-DEV] Re: strlen() under unicode.semantics
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-24198@lists.php.net to get a copy of this message
Nah I didn't mean to get back to that discussion. I was thinking more of a binary dump of info (e.g. session-like stuff) or shooting it over the network. But I agree with Andrei, it's really not a problem to just use one of those methods. > -----Original Message----- > From: Sara Golemon [mailto:pollita@php.net] > Sent: Friday, June 23, 2006 1:16 AM > To: Andi Gutmans; 'Andrei Zmievski' > Cc: '"Ron Korving"'; internals@lists.php.net > Subject: Re: [PHP-DEV] Re: strlen() under unicode.semantics > > >> The only way they can get at the internal UTF-16 representation is > >> via unicode_encode($uni, 'UTF-16') which will return a > binary UTF-16 > >> string. In that case, strlen() will work just as well. > >> > > Hmm, I was thinking we might have some binary write function which > > would do that automagically. I think it'd be worth it. > > > Wasn't this the discussion we had regarding {} versus [] for > string offset access? (The former referring to characters, > the later referring to U16 units. I also recall we dropped > that as the wtf potential outweighed the potential performance gain. > > -Sara >

« previous php.internals (#24198) next »