Re: How can a UTF-8 string can be converted to an array of Bytes?

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

 



On Wed, May 25, 2011 at 8:15 AM, Eli Orr (Office) <eli.orr@xxxxxxxxxxxx> wrote:
> Hi,
>
> Since a UTF-8 is a multi-bytes mechanism I get for 2 or 3 bytes ÂUTF-8
> encoded character a single character
>
> How can it be break into the REAL bytes array that represent the UTF-8
> string
> Âand how Âcan we reassembled the bytes array Âback to UTF-8?
>
> --
> Best Regards,
>
> *Eli Orr*
> CTO & Founder
> *LogoDial Ltd.*
>
> __
>

You can use mb_substr [1] with a UTF-8 encoding to get the single characters.

http://us.php.net/mb_substr

-- 
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