I am stuck in comparing two unicode strings in PHP which both contain the special char \'ö\'. One string comes from $_GET
, the other one is a filesystem\'s fold
See here: http://en.wikipedia.org/wiki/Unicode_equivalence and use this: http://www.php.net/manual/en/class.normalizer.php
You probably have a decomposed character in the longer string, meaning an o and then a umlaut combining character which overlays the previous character.
The normalizer function will fix things like that.
As a side note you should always normalize your input if you are using it for equivalence (for example a username - you want to make sure two people don't choose the same username, even if the binary representation of the string happens to be different).