Revision #22 has been created by fsb on Dec 27, 2011, 12:39:40 PM with the memo:
strlen() and mbstring.func_overload
« previous (#21) next (#23) »
Changes
Title
unchanged
How to set up Unicode
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
i18n, unicode
Content
changed
[...]
php_admin_value mbstring.internal_encoding "UTF-8"
~~~
>Note: Unfortunately it's not recommended to set this an an `.htaccess` file as this may lead to undefined behavior.
When mbstring function overloading is turned on the built-in PHP function `strlen()` counts Unicode characters, not bytes, and the change can break existing code. Use `mb_string($str, 'ISO-8859-1')` to find the byte length of `$str`.
### Links
[Chinese version](http://projects.ourplanet.tk/node/84)