I want to convert a string from utf-8 to iso-8859-1 in php. (actually I want to remove all characters that are not in the ISO-8859-1 character set).
$text = "test ♂️ test xäöüx x@x x€x";
$text = iconv('UTF-8', 'ISO-8859-1//IGNORE', $text);
the expected output would be: test test xäöüx x@x xx
but I get: test test x���x x@x xx
why does iconv have problems with german umlauts? and why are they not removed when in doubt but turned into question marks?