Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

How to handle this PHP encoding issue?

$
0
0
I'm using PHP to grab some JSON from this URL - goo.gl/xdIqEy
 
I've tried using cURL and file_get_contents(), but the 'LastName' element always comes back looking like ─Éur─æi─ç
 
If I view that URL in Chrome, it looks like ÄurÄ‘ić
 
It should look like Đurđić
 
It's obviously some kind of encoding issue, but how do I handle this? The HTTP response headers don't give any clues to the encoding type.
 
I've tried a lot of different iconv combinations when I've got the string back in PHP - but no luck.
 
If I go to that URL in IE, it let's me download the .json file to disk. When I open that in Sublime Text, it looks correct.
 
Any advice?

Viewing all articles
Browse latest Browse all 13200

Trending Articles