- mb_convert_encoding: documentation ( source)
- mb_detect_encoding: documentation ( source)
- mb_strtolower: documentation ( source)
- utf8_encode: documentation ( source)
<?php
$value = utf8_encode('Österreich');
$encoding = mb_detect_encoding($value);
$country = $value;
if ($encoding != 'ISO-8859-1') {
$country = mb_convert_encoding($country, 'ISO-8859-1', $encoding);
}
$country = mb_strtolower($country, 'ISO-8859-1');
echo $country;