Garbled MySQL 5

Source: Internet
Author: User
I have used mysql5 several times before, but I have been using 4.0 because the Chinese Garbled text cannot solve it. Mysql5 supports multiple encoding methods. As long as the stored encoding is consistent with the read encoding, no garbled code is generated, for example, gb2312. 1. Specify the encoding gb2312 in the web page <meta HTTP-EQUIV = "Content-Type" content = "text/html; charset = gb2312"> it is best to execute the SQL statement first:
Mysql_query ("set names 'gb2312 '");
2. Modify the Apache configuration file httpd. conf adddefaultcharset gb2312 3. Modify mysql5 configuration file default_character_set = gb2312. This method is successfully tested in fc5 and Windows XP. Re: http://blog.chinaunix.net/u/19869/showart.php? Id = 121729

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.