If you wish to find the byte length of a multi-byte string when you are using mbstring.func_overload 2 and UTF-8 strings, then you can use the following:
mb_strlen($utf8_string, 'latin1');
![]() | mb_strlenDescriptionint mb_strlen ( string str [, string encoding] )mb_strlen() returns number of characters in string str having character encoding encoding. A multi-byte character is counted as 1. encoding is character encoding for str. If encoding is omitted, internal character encoding is used. See also mb_internal_encoding(), strlen(). ![]()
Peter Albertsson
11-Nov-2004 06:21
If you wish to find the byte length of a multi-byte string when you are using mbstring.func_overload 2 and UTF-8 strings, then you can use the following: | ![]() |