I am using the stripos function to check if a string is located inside another string, ignoring any cases.
Here is the problem:
stripos(\"ø\", \"Ø\")
Use mb_stripos() instead. It's character set aware and will handle multi-byte character sets. stripos() is a holdover from the good old days when there was only ASCII and all chars were only 1 byte.