Intl extention for Unicode support
suggest changeNative string functions are mapped to single byte functions, they do not work well with Unicode. The extentions iconv and mbstring offer some support for Unicode, while the Intl-extention offers full support. Intl is a wrapper for the facto de standard ICU library, see http://site.icu-project.org for detailed information that is not available on http://php.net/manual/en/book.intl.php . If you can not install the extention, have a look at an alternative implemention of Intl from the Symfony framework.
ICU offers full Internationalization of which Unicode is only a smaller part. You can do transcoding easily:
\UConverter::transcode($sString, 'UTF-8', 'UTF-8'); // strip bad bytes against attacks
But, do not dismiss iconv just yet, consider:
\iconv('UTF-8', 'ASCII//TRANSLIT', "Cliƫnt"); // output: "Client"
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents