-
- [mysql]
- default-character-set=utf8
- [mysqld]
- default-character-set=utf8
- default-storage-engine=myisam
- Add under [mysqld]:
- default-collation=utf8_bin
- init_connect='set names utf8'
Copy the code
7. Add in front of the PHP program that needs to do database operations
-
- mb_internal_encoding('utf-8');
Copy the code
8. Add at the end of create table:
-
- engine=myisam default charset=utf8 collate=utf8_bin
Copy code
9.phpmyadmin/config.inc.php
-
- $cfg['defaultcharset'] = 'utf-8';
- $cfg['recodingengine'] = 'iconv';
Copy code
10. When phpadmin exports data
Uncheck "Use hexadecimal display for binary areas"
Note that file system functions do not support utf-8! It is said that php6 has built-in unicode support, so you can test it if you have the chance.
|