即使我将字符集和排序规则设置为 utf8_unicode_ci,phpmyadmin 也会将日语字符显示为一堆问号
好吧,我按照此处找到的所有说明进行操作 我可以在我的页面上显示各种多语言字符...
问题是在 phpmyadmin 中,日文字符被问号替换,就像一堆 ???? ???
拼凑在一起。 我认为我的数据库排序规则有问题,但我只是想在这里验证一下。
我们之前已经在默认排序规则上设置了此数据库,即 latin_swedish_ci
而且它已经有很多数据了。 现在我们必须添加一些需要支持特殊字符的表,所以我绝对无法将数据库的排序规则设置为 utf8
。 我的解决方案是仅在需要此类支持的表以及我们期望包含特殊字符的特定列上使用 utf8
。
但 phpmyadmin 仍然将它们显示为 ??????
。
我的另一个问题是这些字段可以搜索吗?
我的意思是,如果该字段包含一些日语字符并且我输入了 sayuri
作为关键字,那么日语字符是否相当于其英语发音的音节?
okee, I followed all instructions I could find here
and i could display all kinds of multilingual characters on my pages...
The problem is in phpmyadmin the japanese characters are replaced by question marks, as in a bunch of ???? ???
pieced together. I think there's a problem with my database's collation but I just wanted to verify that here.
We've had this database set before on a default collation which is latin_swedish_ci
and it already has a lot of data. Now we had to add some tables that require support for special characters, so I definitely just couldn't set the database's collation to utf8
. My solution was to use utf8
only on the tables which required such support and the specific columns where we expected special characters to be contained.
But still phpmyadmin displayed them as ????
.
Another question that I have is will these fields be searchable?
I mean if the field contains some japanese characters and I typed sayuri
as keyword, will the japanese character equivalent to their syllables pronounced in english?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嗯,关于你的第一个问题,你的系统上安装了日语字体吗? 大多数操作系统上都没有默认安装它们,但我不知道您的操作系统是什么。 下一个很愚蠢,但是您的浏览器设置正常吗?
下一个问题,答案是否定的,如果你搜索“吉永小百合”,它不会与吉永小百合匹配。
注意:你能看到我的日语字符吗?
Mmm, as to your first question do you have Japanese fonts installed on your system? They aren't installed by default on most OSs, but I have no idea what your OS is. Next one is silly but are your Browser settings Ok?
Next question, the answer is no, if you search for 吉永 小百合 it wont' match with Yoshinaga Sayuri.
Note: Can you see my Japanese characters?
我有类似的问题,如果你的标题是正确的。
一旦您建立数据库连接,请使用:
或
I had similar problem, if your headers are correct.
once you made your database connection use:
or
问题是您的连接排序规则未设置为 utf-8(很可能是 latin1),而您需要显示日语字符。 您可以通过发出查询来手动设置它:
或者在 MySQL 配置文件中:
The problem is that your connection collation is not set to utf-8 (most probably latin1), which you need to display the Japanese characters. You could set it manually by issuing the queries:
Or in your MySQL configuration file: