One of my friend encounter a prblem after reconstruction of mysql server. The process is too detail and complex to write down that I only point out the result.
After surveying some resources of the “SET NAMES XXX” command for mysql connection, I realize that the charset settings of client, connection, server, and result are important for an old website. For eample, webpages use big5 but databases use big5 or other more strange settings.
From the resources: [轉載]MySQL 的 “SET NAMES xxx” 字元編碼問題分析, we can use the separate commands for more detail settings:
SET character_set_client = big5;
SET character_set_results = big5;
SET character_set_connection = utf8;
when the tables use utf8 but pages uses big5 and the server default settings are utf8.
Anyway, trying this solution if there is no other choices. 😀