Can anyone help me with this one
I have this query and only after adding the last one wich is indexed against the euro I get invalid json.
$url = 'http://www.google.com/finance/info?client=ig&q=goog,yhoo,AMS:TOM2';
$response= json_decode($response,true);
The only thing different if I directly echo the output is the questionmark in t开发者_StackOverflow中文版he json.
What would I use to replace the eurosign in the json return?, - and hopefully that will solve it.
thanks in adv, Richard
The JSON is valid ISO-8859-1, or Latin1. If your application is using some other encoding, say UTF-8, you need to convert the encoding of the response from Latin1 to UTF-8.
json_encode
and json_decode
expect in/output to be utf-8. PHP defaults to use iso-8859-1 as charset. So you may have to convert. (Note that the euro sign doesn't exist in iso-8859-1).
精彩评论