KEMBAR78
Multibyte string handling in PHP | ODP
Multibyte string handling in PHP with the mbstring extension By Daniel Rhodes of Warp Asylum ( www.warpasylum.co.uk ) As seen on Zend.com!
What is mbstring for? Multibyte string handling
Supports many character encodings including unicode
Supports some different national languages *
Character encoding conversion
Some Japanese specific functions / settings
Mbstring is NOT... A magic way to get the internals of the PHP interpreter itself to suddenly operate natively with unicode (you'll have to wait and follow the development of PHP itself for that!)
How to get mbstring Regular (but not “built-in”) extension for PHP
On most PHP servers it's already there so...
...just switch it on!
Present and switched on out-of-the-box in Zend Server (CE and upwards)
If not present then download, but shouldn't need to compile etc
Some key directives for mbstring mbstring.internal_encoding
mbstring.language
See http://php.net/manual/en/mbstring.configuration.php
Easy peasy in Zend Server
Enough now – let's rock and roll! Mbstring gives us multibyte-safe versions of the “core” string handling functions
For example, we all know strlen() …
… So let's have a look at mb_strlen()
mb_strlen()
More mb_strlen()
Even more mb_strlen()
Still rocking and rolling... Mbstring gives us multibyte-safe versions of the “core” string handling functions For example, we all know strpos() …
… So let's have a look at mb_strpos()
mb_strpos()
More mb_strpos()
Wrapping up and moving on Mbstring gives us multibyte-safe versions of the “core” string handling functions There are LOTS of these multibyte-safe versions of “core” string handling functions – please have a look
BE CAREFUL but you can make calls to strlen() (and etc) automatically call mb_strlen()  - this is the mbstring.func_overload directive
Mbstring specific functions Let's look at character encodings first mb_detect_encoding()
mb_convert_encoding()
LOTS of supported encodings

Multibyte string handling in PHP