How to get json_encode() to work with ISO-8859-1 (åäö)
json_encode() wont work for me when I'm using åäö. Why? And how can I get it to work? The php : echo json_encode($arr); The javascript : var theResponse = JSON.parse(xmlHttp.responseText); When I alert() the response, and the response contains å, ä or ö, the response is = NULL Please, help me out... It says in the json_encode() documentation : This function only works with UTF-8 encoded data. You should convert it to utf-8 with iconv or mbstring first. As Greg mentioned, I had to encode åäö to UTF-8 . But I did't use iconv or mbstring. When I utf8_encode() all values before putting the values