I am using an android app that connects on php files that insert values in mysql database. the problem is the database isn't saving the arabic input correctly but in strange characters. I searched the internet and tried to set everything to UTF-8 .. but it seems there is something missing .. what is it?
edit: this is solved by adding the below command after connecting to the mysql:
$mysqli->set_charset('utf8mb4');
I changed the database collation to utf8_general_ci as per below pic:
(I don't know how to alter Latin1_Swedish_ci) ?!!
- changed the table collation to utf8_general_ci.
- Changed the column collation to utf8_general_ci.
- set the php auditor to utf-8.
- I put that in the php file start:
- I also used utf8 in coding my variables in the android app before sending to php files.