phpmyadmin displays japanese characters as a bunch

2019-06-09 01:16发布

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?

3条回答
forever°为你锁心
2楼-- · 2019-06-09 01:34

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?

查看更多
戒情不戒烟
3楼-- · 2019-06-09 01:37

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");
查看更多
爷、活的狠高调
4楼-- · 2019-06-09 01:46

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
查看更多
登录 后发表回答