mysql odbc character set of Chinese display garble

  • 2020-05-12 06:17:31
  • OfStack

1. Add default-character-set =gb2312 to the [client] TAB in my.ini in the mysql installation directory

[client]
default-character-set=gb2312
port=3306
2. Copy my.ini to the c root directory and change the name to my.cnf

3. When configuring the odbc source, select the option Read Options From my. cnf

MySQL ODBC character set setting

mysql database character set is utf8, adoquery query using delphi7 results show garble
odbc driver version 3.51.15
The treatment is as follows:
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
Modified %windir%\ my. ini (added if not)
It reads as follows:
[client]
default-character-set=gbk
Then select advanced when configuring the ODBC driver > flag3 > read options from my.cnf

Fix the problem after modification

Related articles: