I have a bunch of strings with different charsets. The $charset
variable contains the charset of the current string.
$content = iconv($charset, \'UT
Functions like strlen() count bytes, not characters.
See the notes in the PHP Manual for details:
Note:
strlen() returns the number of bytes rather than the number of characters in a string.
use the mb_* functions if you're working with UTF-8, unless you have the php.ini setting mbstring.func_overload enabled to overload the standard strops(), strlen(), substr(), etc functions... then strlen() will count characters