且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在phpMyAdmin中显示UTF-8字符?

更新时间:2023-11-27 10:47:22

我做了一些谷歌搜索,发现

I did a little more googling and came across this page

该命令似乎没有意义,但无论如何我都尝试过:

The command doesn't seem to make sense but I tried it anyway:

在函数PMA_DBI_connect()末尾的文件/usr/share/phpmyadmin/libraries/dbi/mysqli.dbi.lib.php中,在我添加的return语句之前:

In the file /usr/share/phpmyadmin/libraries/dbi/mysqli.dbi.lib.php at the end of function PMA_DBI_connect() just before the return statement I added:

mysqli_query($link, "SET SESSION CHARACTER_SET_RESULTS =latin1;");
mysqli_query($link, "SET SESSION CHARACTER_SET_CLIENT =latin1;");

它有效!我现在在phpMyAdmin中看到日语字符. WTF?为什么这样做有效?

And it works! I now see Japanese characters in phpMyAdmin. WTF? Why does this work?