phpMyAdmin Display utf8_general_ci Chinese garbled problem final level _php tutorial

Source: Internet
Author: User
I have been writing PHP for more than a year, and then the coding problem is always not a good solution, their own situation is such,

Web page display is completely normal, in the phpMyAdmin database display Chinese garbled, whether it is simplified or traditional, as long as the Chinese is the following display form: Æ¢§å žæ —... Ƹ¸

However, the Web page you have written is completely normal, whether it is traditional, or simplified, it will not garbled the situation.

Of course my page is saved as Utf-8 format, plus I read the library operation when added mysql_query ("Set names ' Utf-8 '), the statement, so see in the Web page is completely normal, of course, only in the phpMyAdmin display is garbled, if you see here , the Web Part is garbled, then, according to my words, the Web page with Notepad Save as Utf-8 format, and then specify in the Web page, and then add mysql_query when reading the database ("Set names ' Utf-8 '"); certainly not garbled, of course the database , data tables, fields are also to be saved as utf8_general_ci encoded form , through the above operation, in the Web page is absolutely no garbled situation, today I explain here is in the phpMyAdmin display as garbled problem, This is an end-level article to solve garbled, after a good read this article, garbled will no longer appear in our program and database.

Good, look at the text section, you display in the Web page is absolutely no longer garbled problem, however, in the phpMyAdmin display Chinese or garbled, their own use of the time of day, good analysis of their own code, encoding format, there are phpmyadmin encoding format, search GG, Ask the advanced technical personnel, all no fruit, of course, asking for help, and then slowly analyze the problem of coding, and finally found their own in the phpMyAdmin why will show garbled problem, if you want to go deep to understand the coding problem, for later no longer let garbled troubled you, you have to check the two differences: UTF8 and utf-8, do not look at him anything is the same, only a line, the difference, will be your phpmyadmin into garbled, good, analysis of their own garbled situation, the red word part of the change, the following is the anti-garbled appearance of the end-level attention method, Include garbled issues in Web pages and phpMyAdmin:

1 Save all pages in Notepad as Utf-8:

NOTE: ANSI is applicable to BIG5 and GBK

2 in your own Web page to specify the encoding format, this is relatively simple, not much explanation

3 database operation plus mysql_query ("Set names ' UTF8 '"); see is UTF8, not utf-8, related to the first line, Utf-8 in phpMyAdmin will be garbled, their own program for more than a year, has been used utf-8, Guide to In phpMyAdmin has been garbled format, now change back to UTF8 finally put phpMyAdmin display Chinese garbled problem to solve, but a note, change to UTF8, you before the storage of Chinese in the page read out will be all garbled, if the content is very much do not change , at most just phpMyAdmin is garbled, the page display is always normal, here to change to UTF8 is the future development of the program with this is the Web page, phpMyAdmin all display will be normal, for garbled problem said.

4 The encoding format for the database is utf8_general_ci, table format is also Utf8_general_ci, the Chinese text section is also used utf8_general_ci, see phpMyAdmin of the map:

The above is the library and the table is organized as utf8_general_ci, then the field load diagram:

Well, do these few steps with UTF8 code will not have garbled appear, original articles, reproduced please indicate to Teng horse PHP blog

http://www.bkjia.com/PHPjc/326671.html www.bkjia.com true http://www.bkjia.com/PHPjc/326671.html techarticle write their own PHP for more than a year, and then the coding problem is always not a good solution, their situation is such, the page is completely normal, in the phpMyAdmin database display Chinese garbled, no matter ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.