Is the behavior of iconv in certain systems a bug or just poorly documented?

The behavior of iconv in certain systems where it does not correctly handle character encoding conversions may be due to a bug or poorly documented behavior. To solve this issue, you can explicitly specify the input and output character encoding to ensure proper conversion.

$inputString = 'Input string to convert';
$inputCharset = 'UTF-8';
$outputCharset = 'ISO-8859-1';

$outputString = iconv($inputCharset, $outputCharset, $inputString);

echo $outputString;