How to solve special character problem (like Turkish, Japannese etc) that occurs when return a result set as JSON?
You have special charachter in a resultset, maybe some errors occurs when it returns as json.
You can solve this problem using following solution. The function will convert only string data. Else this, won't be converted
4 yorum:
iconv(mb_detect_encoding($text, mb_detect_order(), true), "UTF-8", $text);
if you would you like to use this one for the issue..
How you create your JSON output ?
If you can do your JSON objects manually ( like with string builder ) do you notice Response Encoding ?
Did you notice Response Encoding ?
Thanks Osman and Selcuk.
Selcuk;
My JSON DATA is create from an resultset array.
Osman, This function do this operation all items of resultset automatically. Response Encoding was not enough in our operation.
Thanks a lot.
Yorum Gönder