Re: substr and UTF-8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 30 Aug 2006 21:46:18 +0700
"Peter Lauri" <lists@xxxxxxxxxxx> wrote:

>   function is_utf8_start($b) {
>       return (($b & 0x80) == 0) || ($b & 0x40);
>   }
> [/snip]
> 
> :) I think I will go with the mb_substr function, it works for me :)

Yeah, I guess that's the right thing to do. Otherwise, in a year you
won't remember what the cryptic masking is all about.

Mike

-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux