When the database content is displayed on the webpage, garbled characters [size18px] [size] [B] are displayed! The mysql character set for my phpmyadmin is utf-8unicode (utf8), and each data table is sorted as utf8_general_ci; mysql connection proofread: utf8_general_ci, language is Chinese-chinesesimplified, in addition, garbled characters occur when the program database content is displayed on the webpage.
[Size = 18px] [/size] [B] Hello!
The mysql character set used by phpmyadmin is UTF-8 unicode (utf8 ),
Each data table is organized into utf8_general_ci;
Mysql connection verification: utf8_general_ci,
The language is chinese-chinese simplified,
Mysql_query ("set name 'utf8'") is also used in the program '").
Even if I did the above content, the content searched from the database still encountered garbled characters. why? [/B]
------ Solution --------------------
If the data in the database is normal, try encoding in the browser.
------ Solution --------------------
Is it a foreign server? if so, another method may be used...
------ Solution --------------------
Mysql_query ("set names 'utf8 '").
------ Solution --------------------
Good eyesight ~
Discussion
Mysql_query ("set names 'utf8 '").
------ Solution --------------------
Check that your program files are also saved in UTF-8 encoding.
If yes, please post garbled content. Be sure to use base64_encode to encode it.
------ Solution --------------------
See the format of your editor file.
------ Solution --------------------
The page also uses UTF-8
------ Solution --------------------
Define the encoding.
------ Solution --------------------
Check the 3.1 line, that is, the encoding of the database, php and html files, and set the charset of html to be consistent, you can try "view"-> encoding-> UTF8 and Chinese encoding in the browser. check the content changes on the page to see if there is a problem at that stage.
------ Solution --------------------
Discussion
Check the 3.1 line, that is, the encoding of the database, php and html files, and set the charset of html to be consistent, you can try "view"-> encoding-> UTF8 and Chinese encoding in the browser. check the content changes on the page to see if there is a problem at that stage.
------ Solution --------------------
I have encountered errors in these three places. Haha.
------ Solution --------------------
Discussion
Check that your program files are also saved in UTF-8 encoding.
If yes, please post garbled content. Be sure to use base64_encode to encode it.