I want to insert Arabic data in MySQL database. I tried to change the table encoding to UTF-8 using this command:
ALTER TABLE `t` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Value inserted || Value selected || Hex value selected
دددد || Ï»Ï»Ï»Ï» || C38FC2BBC38FC2BBC38FC2BBC38FC2BB
rrr || rrr || 727272
I finally solved the problem.
After checking where mysqld gets the default options from using the command:
mysqld --help --verbose > temp_file_path
In the temp file, I found that it gets the default options as stated below:
Default options are read from the following files in the given order: C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\MySQL Server 5.6\my.ini C:\Program Files\MySQL\MySQL Server 5.6\my.cnf
None of these files were found on my machine, so I had to rename the file 'my-default.ini' to 'my.ini'. Adding the correct encoding to the file, the problem was solved.