Yes, bytes are ok for now. I still think it makes php unnecessarily difficult 
to program. If php were a 3gl it would be fine. 

;-)

It is not that it can't work. It is that php shouldn't require users to do 2 
types of accounting and have two variables for tracking positions. (one to 
remember byte offsets and one to remember character/grapheme equivalent index.) 
I guarantee bugs due to the variables getting out of sync.

Hey, do we have a function that returns the character index, given a byte index?

I guess you do a grapheme_length(grapheme_substr(bytes)...
A function that gives the grapheme count for a string starting at byte offseet 
for a length of n bytes would be handy.

(still not able to access specs from here)
tex

> -----Original Message-----
> From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 13, 2008 3:47 PM
> To: Texin, Tex
> Cc: Ed Batutis; php-i18n@lists.php.net
> Subject: Re: [PHP-I18N] proposal: unification of the 
> grapheme_extract functions
> 
> Hi!
> 
> > You could make the type work with flags rather than type so 
> as not to need an additional argument.
> > 
> > So you would declare the mix and match of start/next units 
> and length 
> > units as flag1+flag2 Where both flag1 and flag2 would have 
> appropriate defaults for a value of 0.
> > Flag1 would use bits 4-6 and flag2 bits in the range 1-3 or 
> some such.
> > 
> > Don't hate me it is just a suggestion.
> 
> Not hating, but I still think just bytes are enough :) If we 
> discover real code where I'm wrong and it can't work, we can 
> add it later, right?
> --
> Stanislav Malyshev, Zend Software Architect
> [EMAIL PROTECTED]   http://www.zend.com/
> (408)253-8829   MSN: [EMAIL PROTECTED]
> 
> --
> PHP Unicode & I18N Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to