php weird encoding behavior using strtolower('Fötus');

Viewed 72

there seems to be some weird encoding issue when I run:

echo strtolower('Fötus');

I get f�tus

Why is ö even touched? (It is already lowercase)

1 Answers

You need to use mb_strtolower() function as like below

echo mb_strtolower('Fötus');
// Output is fötus
Related