I have a PHP-powered RSS feed caching system. If a feed contains certain characters, e.g. curly quotes/apostrophes, these are coming back in the cURL response wrecked.
Example feed: http://www.theguardian.com/football/hullcity/rss (note curly apostrophes)
cURL code:
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_TIMEOUT => CURL_CONNECT_TIMEOUT
));
Resultant data (extract from):
Sergio Agüero is firing again, José Mourinho’s propaganda ...
Is there some cURL option I should be configuring, or do I have no choice but to string-handle these out after cURL has finished?
I know there's a cURL option CURLOPT_ENCODING
but to my knowledge that's about encoding data sent, not retrieved.