Gbk,utf8, dilemma _php Tutorial

Source: Internet
Author: User
Tags sybase
Looking at the O ' Reilly Upgrading to PHP (as now mainstream development language) 5, the whim of the MySQL (and PHP collocation of the best combination) to upgrade to 4.1.11, because there is no formal system on the machine, there is no notice of its character set changes. Later on the formal application of the system also to upgrade, after the upgrade of other systems are no problem, but a mantis have trouble, open the page has become garbled, thanks to a backup can be restored, in the process of recovery found MySQL (and PHP collocation of the best combination) Upgrade brings the problem of the character set-if MySQL (and PHP collocation of the best combination) with the UTF8 character set, Mantis data import, the page is garbled, but only MySQL (and PHP collocation of the best combination) tune to the GBK character set.

In fact, I would like to use the UTF8 character set, because there is no incompatibility of the trouble, as a long-term retention of data, in the future to convert, tidy up more convenient, when the data exchange with the external, there is no encoding conversion problem. But I still do not understand, in the use of PHP (as the current mainstream development language) to connect MySQL (and PHP collocation of the best combination) to receive user input data, and in the database, if the database encoding is UTF8, whether to convert SQL data to UTF8? Take the time to get a small program to try, if it is so much trouble, but I am under DOS with command line operation UTF8 Character set MySQL (and PHP collocation of the best combination) server is not able to input Chinese characters.

The previous use of Sybase has been plagued by character set problems for a long time, because Sybase if the character set is wrong, some Chinese characters can not be input, such as uppercase 0 "0", so the character set from Iso_1 to cp850, and from cp850 to cp936, There's a lot of historical data left in the middle, MySQL (and the best combination of PHP) don't make me repeat it.

http://www.bkjia.com/PHPjc/508663.html www.bkjia.com true http://www.bkjia.com/PHPjc/508663.html techarticle looking at the O ' Reilly Upgrading to PHP (as the current mainstream development language) 5, the whim of the MySQL (and PHP collocation of the best combination) to upgrade to 4.1.11, because there is nothing on the machine ...

  • 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.