Reputation: 1969
I'm getting mad with this utf8 and ansi and ascii stuff. Always the same old story...
I have an url that includes a GET parameter: http://www.example.com/?c=Österreich
In my PHP script, I make a switch:
switch ( strtolower( $country ) ) {
case "deutschland":
$country = "DE";
break;
case "österreich":
$country = "AT";
break;
case "schweiz":
$country = "CH";
break;
default:
$country = "DE";
break;
}
For Östereich, I get the default value "DE". So how to solve this?
Upvotes: 0
Views: 123
Reputation: 5109
You need to use multibyte functions to manage UTF8 strings, so mb_strtolower() instead of strtolower()
Upvotes: 3