phpmyadmin 为 mysql 的 utf8_bin 调用列显示数字或 blob?

2022-01-05 00:00:00 utf-8 mysql phpmyadmin collation

我有一个带有 varchar 列的表.其排序规则设置为 utf8_bin.我使用这个表和列的软件工作得很好.但是当我查看phpmyadmin中的内容时,我只看到了一些十六进制值或[Blob xB].我可以让 phpmyadmin 正确显示内容吗?

I have a table with a varchar column. Its collation is set to utf8_bin. My software using this table and column works perfectly. But when I look at the content in phpmyadmin, I only see some hex values or [Blob xB]. Can I make phpmyadmin show the content correctly?

此外,当我将排序规则设置为 utf8_general_ci 或 utf8_unicode_ci 时,phpmyadmin 会正确显示内容.

Besides, when I set the collation to utf8_general_ci or utf8_unicode_ci, the phpmyadmin shows the content correctly.

谢谢马克

哈,我发现在 phpmyadmin 的每个表上方都有一个小的+选项"链接.它打开了几个选项,包括显示 BLOB 内容" - 启用时使 [blob] 可读文本和将二进制内容显示为十六进制",禁用时将十六进制代码显示为文本.

[edit]Hah, I found out, there is a small "+Options" link above every table in phpmyadmin. It opens several options including "Show BLOB contents" - which makes the [blob] to readable text when enabled and "Show binary contents as HEX" which shows the hex codes as text when disabled.

不知道为什么有两个选项,为什么有时有 [Blob] 有时有十六进制值.

No idea why there are two options though and why sometimes there is a [Blob] and sometimes hex values.

嗯.现在我仍然想知道:当我去另一张桌子时,设置这些选项会丢失.我每次去那里都必须设置它们.有没有办法保存这些选项?[/编辑]

Well. Now I'm still wondering: Setting these options get lost when I go to another table. I have to set them every time I go there. Is there a way to save those options? [/edit]

推荐答案

  • 不要编辑这个文件,而是编辑 config.inc.php !!!
  • 因此,要根据 PMA 作者的正确文档执行此操作,请编辑 config.inc.php.添加行:$cfg['DisplayBinaryAsHex'] = false;

    So, to do this in line with PMA author's correct documentation, edit config.inc.php. Add the line: $cfg['DisplayBinaryAsHex'] = false;

    到您的 config.inc.php 文件.

    to your config.inc.php file.

    ;-)

相关文章