json_encode() wont work for me when I\'m using åäö. Why? And how can I get it to work?
json_encode()
The php:
php
echo json_encode($arr);
The $data (in my case) is an array with text values as ISO-8859-1. The trick below prepares $data to be used with json_encode.
$data
json_encode
function toUtf8(&$v, $k) { $v = utf8_encode($v); } array_walk_recursive($data, 'toUtf8');