Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL with Japanese characters

I am trying to figure out how to create a table such that I can insert Japanese names into it. Right now I have:

Type: InnoDB
Encoding: UTF-8 Unicode (utf8)
Collation: utf8_general_ci

However, when I insert the characters, it shows up as ????. And when I retrieve the data using SELECT, it also shows up as ????. What do I need to do such that I can properly store and retrieve Japanese characters (kanji, hiragana, and katakana)?

like image 848
David542 Avatar asked Oct 28 '25 01:10

David542


1 Answers

Doing an ALTER to charset utf8 solved the issue:

ALTER TABLE title MODIFY 
    column VARCHAR (100)
    CHARACTER SET utf8
    COLLATE utf8_unicode_ci;
like image 105
David542 Avatar answered Oct 29 '25 17:10

David542



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!