json_encode() json_decode() working with UTF-8
Working with different locale is very important now a days. But to work with different languages you face some problems – like all of a sudden some function will not work like it supposed to. For instance json_decode/json_encode. The problem is not with the functions cause in php manual they said it works with utf
“This function only works with UTF-8 encoded data. ”
So all you have to do is add the nex line in php code.
header('Content-Type: text/html; charset=utf-8');
Pretty sweet huh.