Table of contents Home page
mb_internal_encoding('UTF-8'); $x = 'ÜBER'; echo "Conversion of '$x' to '" . mb_strtolower($x) . "'.\n";
mb_internal_encoding('UTF-8'); $x = "\xdcBER"; // String encoded in ISO-8859-1 echo mb_convert_encoding("Conversion of '$x' to '" . mb_strtolower($x, 'ISO-8859-1'), 'UTF-8', 'ISO-8859-1') . "'.\n"; // Because we've explicitly specified the encoding used for the string (ISO-8859-1), which is different from the // internal encoding (UTF-8), mb_strtolower() still converts the string to lowercase correctly. // Note that we assume that the output must be send in UTF-8, so we convert the result of mb_strtolower() from // ISO-8859-1 to UTF-8, using mb_convert_encoding(), in order to have the string displayed correctly.