XAMPP的数据库默认是 latin1 字符编码,虽然不影响写入和读取数据,但是在phpMyAdmin里查看都是乱码。网上查了下,通过 show variables like "%char%"; 查看数据库编码
最后在my.ini里找到了相关语句
1 2 3 4 5 6 |
## UTF 8 Settings #init-connect=\'SET NAMES utf8\' #collation_server=utf8_unicode_ci character_set_server=utf8 #skip-character-set-client-handshake #character_sets-dir="C:/xampp/mysql/share/charsets" |
There are no comments yet