The following is a very boring article, which is filled with a lot of encoding, conversion, client, server, connection ...... Well, I don't want to see it myself, but I think it makes some sense to write it down for four reasons:
MySQL 4.1 has greatly changed its support for multiple languages (which leads to problems );
MySQL 3 remains dominant in most cases (including personal use and host providers), but MySQL 4.1 is the database officially recommended by MySQL, host providers are beginning to provide and will become more and more;
Many PHP programs use MySQL as the default database management software, but they generally do not distinguish between MySQL 4.1 and earlier versions, generally referred to as "MySQL 3. xx. xx or later versions meet the installation requirements;
Because latin1 is used as the default character set in many places (which are described in detail below), it successfully blinded developers and users of many PHP programs, it masks problems in Chinese and other language environments;
Simply put, the changes in MySQL and the use of MySQL's PHP programs ignore this, leading to the emergence and complexity of the problem, because most users use english, this problem is ignored. The PHP program mentioned here is mainly for WordPress.
Principles supported by MySQL 4.1 Character set
MySQL 4.1 specifies the character set to be refined to the MySQL installed on a machine. One database, one table, and one column of the table, which character set should be used. However, traditional Web programs do not use such complex configurations when creating databases and data tables. They use default configurations. So where does the default configuration come from?
A default character set is specified during MySQL Compilation. The character set is latin1;
When installing MySQL, you can specify a default character set in the configuration file (my. ini). If it is not specified, this value is inherited from the value specified during compilation;
When you start mysqld, you can specify a default character set in the command line parameters. If not, this value is inherited from the configuration file;
In this case