I have this code:
$header = 'weird character->>>ÅÅÖÄ';
$header = strtolower(str_replace(array(' ', ' '), '-', preg_replace('/[^a-zA-Z0-9 s]/', '', trim($header))));
It should output weird-characteraaoa, but it doesn’t. It just removes the ÅÅÖÄ-letters. Any idea why this isn’t working? I’m using UTF-8 if that has something to do with it
This is a hard problem since not all languages can match-up well with ASCII characters.
However, @AlixAxel has the current best implementation I’ve ever seen in his phunction framework.