I'm trying to decode a soap response and the only thing that is working is str_replace() and going through each item one by one. This is very odd as html_entity_decode() used to work on my server, (before my admin enabled php's soapclient). Anyhow here's the code:
$str = <<<Eof
lt;?xml version=quot;1.0quot; encoding=quot;utf-8quot;?gt;
Eof;
// below will work, but it's clunky
$str = str_replace('lt;', '<', $str);
$str = str_replace('gt;', '>', $str);
$str = str_replace('quot;', '"', $str);
echo "string: ".$str."<BR>";
// nothing below decodes it at all
echo "utf8_decode() = ".utf8_decode($str);
echo "<BR><BR>";
echo "rawurldecode () = ".rawurldecode ($str);
echo "<BR><BR>";
echo "base64_decode() = ".base64_decode($str);
echo "<BR><BR>";
echo "htmlspecialchars_decode() = ".htmlspecialchars_decode($str,ENT_QUOTES);
echo "<BR><BR>";
echo "urldecode() = ".urldecode($str);
echo "<BR><BR>";
echo "html_entity_decode() = ".html_entity_decode($str);
Shouldn't the soap response be utf 8 encoded? It seems that it isn't. For example it's coming back in as "lt;" instead of "<"
Anybody know what's up?