php - why browser shows \u0627\u062c\u062a\u0645\u0627\u0639\u06cc and etc instead of real utf8 characters? -
php - why browser shows \u0627\u062c\u062a\u0645\u0627\u0639\u06cc and etc instead of real utf8 characters? -
i set utf8 php code:
<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> </head> <?php header("content-type: text/html; charset=utf-8"); if (isset($_request['op'])){ $op = $_request['op']; } else { echo "invalid op"; exit; }
and database connection:
function db_connect(){ $con = mysqli_connect("localhost", "root", "", "ex"); mysqli_set_charset($con, 'utf8'); if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } homecoming $con; }
and saved records utf8
characters in database , set collation utf8_general
, utilize set names utf8;
in sql. see unicode in browser instead of real records in db! can see real records western farsi letters on browser? give thanks answering soon
php mysql sql unicode utf-8
Comments
Post a Comment