phpmyadmin displays japanese characters as a bunch of question marks even if i set charset and collation to utf8_unicode_ci

久未见 提交于 2019-12-08 05:06:15

问题


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?


回答1:


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?




回答2:


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:

SET CHARACTER SET utf8;
SET NAMES utf8;

Or in your MySQL configuration file:

default-character-set=utf8
skip-character-set-client-handshake



回答3:


I had similar problem, if your headers are correct. once you made your database connection use:

mysqli_set_charset ( $mysqli,'utf8'); 

or

$mysqli->set_charset("utf8");


来源:https://stackoverflow.com/questions/332781/phpmyadmin-displays-japanese-characters-as-a-bunch-of-question-marks-even-if-i-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!