Please, note that when using with UTF-8 mb_strtolower will only convert upper case characters to lower case which are marked with the Unicode property "Upper case letter" ("Lu"). However, there are also letters such as "Letter numbers" (Unicode property "Nl") that also have lower case and upper case variants. These characters will not be converted be mb_strtolower!
Example:
The Roman letters Ⅰ, Ⅱ, Ⅲ, ..., ? (UTF-8 code points 8544 through 8559) also exist in their respective lower case variants ⅰ, ⅱ, ⅲ, ..., ? (UTF-8 code points 8560 through 8575) and should, in my opinion, also be converted by mb_strtolower, but they are not!
Big internet-companies (like Google) do match both variants as semantically equal (since the representations only differ in case).
Since I was not finding any proper solution in the internet on how to map all UTF8-strings to their lowercase counterpart in PHP, I offer the following hard-coded extended mb_strtolower function for UTF-8 strings:
The function wraps the existing function mb_strtolower() and additionally replaces uppercase UTF8-characters for which there is a lowercase representation. Since there is no proper Unicode uppercase and lowercase character-table in the internet that I was able to find, I checked the first million UTF8-characters against the Google-search and -KeywordTool and identified the following 78 characters as uppercase-characters, not being replaced by mb_strtolower, but having a UTF8 lowercase counterpart.
<?php
function strtolower_utf8_extended( $utf8_string )
{
$additional_replacements = array
( "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "Ⅰ" => "ⅰ" , "Ⅱ" => "ⅱ" , "Ⅲ" => "ⅲ" , "Ⅳ" => "ⅳ" , "Ⅴ" => "ⅴ" , "Ⅵ" => "ⅵ" , "Ⅶ" => "ⅶ" , "Ⅷ" => "ⅷ" , "Ⅸ" => "ⅸ" , "Ⅹ" => "ⅹ" , "Ⅺ" => "?" , "Ⅻ" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "?" => "?" , "??" => "??" , "??" => "??" );
$utf8_string = mb_strtolower( $utf8_string, "UTF-8");
$utf8_string = strtr( $utf8_string, $additional_replacements );
return $utf8_string;
} ?>