0

I'm trying to convert the lower case letter 'ß' to the upper case pendant. I already tried using the built-in functions strtoupper and mb_strtoupper.

The following happened when I use strtoupper:

echo strtoupper('ß'); // leads to 'ß'

The following happened when I use mb_strtoupper:

echo mb_strtoupper('ß', 'UTF-8'); // leads to 'SS'
Tarik Weiss
  • 336
  • 2
  • 15

1 Answers1

1

Have a look at this answer for why Python has a similar behaviour https://stackoverflow.com/a/62769447/11924322

This explains why PHP also has this behaviour.

Girgias
  • 384
  • 2
  • 8
  • When you can resolve a new question with a pre-existing page/answer on Stack Overflow, then please do not post an answer. The appropriate resolution would be to flag/vote to close the page as a duplicate. – mickmackusa Aug 24 '21 at 22:22
  • @mickmackusa actually it was a PHP specific question, but the answer to the problem is exactly the same. – Tarik Weiss Aug 25 '21 at 13:58