iconv: se detectó un carácter ilegal en la cadena de entrada
No veo nada ilegal: ¿alguna sugerencia sobre cuál podría ser el problema?
if (strtolower($matches[1]) != 'utf-8') {
var_dump($matches[1]);
$xml = iconv($matches[1], 'utf-8', $xml);
$xml = str_replace('encoding="'.$matches[1].'"', 'encoding="utf-8"', $xml);
}
Debajo está mi depuración / error
string(12) "windows-1252"
Notice (8): iconv() [http://php.net/function.iconv]: Detected an illegal character in input string [APP/models/sob_form.php, line 16]
He verificado que el código anterior es de hecho la línea 16