JSON Unicode doen't work or phpMyAdmin? -
i searched in web stackoverflow problem didn't resolved.
im trying json database shows question sign (?)
[{"task_id":"13","task_title":"???","task_desc":"??? ???","task_done":"0"}]
i set db collation utf8_persian_ci; didnt work me. used php codes didnt worked me:
- mysql_set_charset('utf8'); (didn't worked)
- set db collation utf8_persian_ci (didn't worked)
- header('content-type: application/json; charset=utf-8');(didn't worked)
- function escapejsonstring($value) { $escapers = array("\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); $replacements = array("\\", "\/", "\\"", "\n", "\r", "\t", "\f", "\b"); $result = str_replace($escapers, $replacements, $value); return $result; }
- echo my_json_encode($output , json_unescaped_unicode);(error : use of undefined constant json_unescaped_unicode - assumed 'json_unescaped_unicode' in e:\dev\project\web\note-server\service.php on line 57 )
Comments
Post a Comment