Search code examples
phpreplacejsoneuro

replace eurosign in json


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 the json.

What would I use to replace the eurosign in the json return?, - and hopefully that will solve it.

thanks in adv, Richard


Solution

  • 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.