I'm afraid this doesn't seem to work. I have the following code implemented:
$baseFileName = preg_replace('/\.[^.]*$/', '', $uploadedFile["name"]);
$baseFileName = str_replace(' ', '', $baseFileName);
$baseFileName = str_replace(array("ö","ü","ä","é","è","à"), '', $baseFileName);
It removes spaces but not the special characters. Also this is not working:
$baseFileName = preg_replace('/\.[^.]*$/', '', $uploadedFile["name"]);
$baseFileName = str_replace(array(' ',"ö","ü","ä","é","è","à"), '', $baseFileName);
This also removes the spaces in the filename but not the special characters