PHP iconv Detected an illegal character in input string

With the following code:

echo iconv('utf-8', 'Windows-1250//ignore', $xml);

I got the following PHP error:

iconv(): Detected an illegal character in input string

Solution

Uppercase IGNORE 😀

 echo iconv('utf-8', 'Windows-1250//IGNORE', $xml);
Advertisements