I would like to ask you a question about Php+mysql character encoding, thank you

Source: Internet
Author: User
I'd like to ask you a question about Php+mysql character encoding.
Want to set up the site to UTF8, check a lot of information, the truth also understand, the page, program, database character encoding unified together. The truth is clear, do not know how to do.

Web server space rented by someone else, MySQL config I can't control myself.


Page with the DREAMWEAVER5 design, the default encoding is exactly utf-8. What else needs to be done?

Share to:


------Solution--------------------
The database is human, you can not modify the settings
What you can do is
1, the establishment of the table when the text section plus a connection to proofread gbk_chinese_ci or utf8_general_ci
Tell MySQL what character set to store data in
2. After connecting to the database, execute set names GBK or set names UTF8 instruction
Tell MySQL what character set to use to communicate with him

  • Related Article

    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.