Php reads Chinese characters in the text file and inserts them into the database. Chinese characters are garbled.-ask me to read Chinese characters from the text file and insert them into the MYSQL database. in phpmyadmin, check that this field is garbled, very depressing... my text files are UTF-8 encoded, php files, databases, and data tables are all UTF-8 encoded. I really don't know where the problem is. Have you ever encountered such problems? Thank you! ------ Solution ------------- How to insert Chinese characters in the text file into the database in php, Chinese characters garbled-tutorial
I read Chinese characters from a text file and inserted them into the MYSQL database. in phpmyadmin, I checked the field as garbled and it was very depressing... my text files are UTF-8 encoded, php files, databases, and data tables are all UTF-8 encoded. I really don't know where the problem is. Have you ever encountered such problems?
Thank you!
------ Solution --------------------
Conn. php is posted. why? Account hiding
It is possible that the set names 'utf8'; or equivalent function statement is not executed.
------ Solution --------------------
1. You seem to have missed a picture: the garbled figure in phpmyadmin
2. unless you use show variables like 'character \ _ set \ _ % 'to view utf8
Otherwise, set names utf8 cannot be less