MySQL与日文字符 [英] MySQL with Japanese characters
本文介绍了MySQL与日文字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图找出如何创建一个表,以便我可以在其中插入日语名称。现在我有:
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
但是,当我插入字符时,它显示为? ???
。当我使用 SELECT
检索数据时,它也显示为 ????
。我需要做什么才能正确地存储和检索日文(汉字,平假名和片假名)?
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)?
推荐答案
执行 ALTER
到 charset
utf8
解决了这个问题: / p>
Doing an ALTER
to charset
utf8
solved the issue:
ALTER TABLE title MODIFY
column VARCHAR (100)
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
这篇关于MySQL与日文字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文