Strtoupper Å Ä Ö fix UTF-8

As you might know the Stroupper dont work with special chars like Å Ä Ö. Also its not working to do str_replace sice Å Ä Ö is not supported there. But there is a way to do this easy with mb_stroupper and use UTF-8, see my example:

$string = “åäö”;

$string=mb_strtoupper($string, “utf-8″);

echo $string;

Enjoy!

$string=mb_strtoupper($string, “utf-8″);

One Response to “Strtoupper Å Ä Ö fix UTF-8”

  • 1 Zno Says:

    hey man u r the king!

    it works well with latin2 too
    echo mb_strtoupper($yourtext, “iso-8859-2″);

    thnx

Leave a Reply