Thursday, 15 August 2013

French characters not being displayed properly

French characters not being displayed properly

I am using curl to pull in a news feed, however the french version is
pulling in some weird characters.
For example "activités" should be "activités"
$feed = curl_init($json);
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array('Content-type: application/json'),
CURLOPT_POSTFIELDS => $feed
);
curl_setopt_array($feed, $options);
$news = curl_exec($feed);
curl_close($feed);
$articles = json_decode($news, true);

No comments:

Post a Comment