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... 回答1: 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. 回答2: As Greg mentioned, I had to