Monday 27 March 2017

php - How To Store Tamil Font in mysql database




$servername = "localhost";
$username = "root";

$password = "";
$dbname = "test";
$conn = mysqli_connect($servername, $username, $password, $dbname);
$sql = "Insert into tbl (name) VALUES ('ஆன்லைனில்')";
$result = mysqli_query($conn, $sql);


But Its Store Db in
ஆனà¯à®²à¯ˆà®©à®¿à®²à¯


Answer



Change the column format




ALTER `tbl` CHANGE `column_name` `column_name` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...