I have a php netbeans project. The encoding for the project is UTF-8. Special characters display correctly in the ide. (img 1)
I use phpmyadmin and the encoding for the entire database is utf8_unicode_ci (the column also shows this). (img 2)
I use mysqli to connect, and it doesn't make any diference if I call
set_caharset("utf8");
(img 3)
In the browser everything is ok (including searches with special characters): (img 4)
But in phpMyAdmin the text introduced through mysqli is scrambled (whilst text introduced manually is ok - id 13 in the picture) (img 5)
What should I do to send text correctly in phpmyadmin.
[edit] Some more info. I don't know how to interpret or use this, bu this is what
SHOW VARIABLES LIKE 'character_set%'
displays.
Variable_name: Value
character_set_client: utf8mb4
character_set_connection: utf8mb4
character_set_database: latin1
character_set_filesystem: binary
character_set_results: utf8mb4
character_set_server: latin1
character_set_system: utf8
character_sets_dir: D:\Programe\XAMPP\mysql\share\charsets\
[edit2] Ok, it is something that is server related. I uploaded the same code that generated the database on a different server and everything is ok. Do you have any ideas where the problem could be?
It's resolved!
I'm not sure how, because I made multiple modifications before testing. Where I edited:
on the front-page of phpmyadmin (localhost/phpmyadmin) under server colation I choose other types of utf8.
I had a different connection class for the setup where I didn't call: set_caharset("utf8");