Mysql is case-insensitive when querying strings. In programming mysql, The ISO-8859 character set is generally used as the default character set. Therefore, the case-sensitive conversion of Chinese encoding Characters During the comparison process is caused, the emergency response is to add the binary attribute to a field containing Chinese characters for binary comparison.
Mysql is case-insensitive when querying strings. In programming mysql, The ISO-8859 character set is generally used as the default character set. Therefore, the case-sensitive conversion of Chinese encoding Characters During the comparison process is caused, the emergency response is to add the binary attribute to a field containing Chinese characters for binary comparison.
Mysql Chinese sorting method 1
Mysql is case-insensitive when querying strings. In programming mysql, The ISO-8859 character set is generally used as the default character set. Therefore, the case-sensitive conversion of Chinese encoding Characters During the comparison process is caused, the emergency response method is to add the "binary" attribute to fields that contain Chinese characters for binary comparison,
For example, change "name char (10)" to "name char (10) binary "."
(Tested successfully)
Mysql Chinese sorting method 2
Use -- with -- charset = gbk when compiling mysql
(Not tested)