I have a MySQL DB. I created a table with below definition which supports multiple languages (Hindi, Thai, etc.).
CREATE TABLE test_multi_lang
(
language_name varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci
)
INSERT INTO test_multi_lang
(language_name )
VALUES
('ตัวอย่าง')
INSERT INTO test_multi_lang
(language_name )
VALUES
('नमूना')
But when I select the data. It is showing all the data as ??????
.
SELECT * FROM test_multi_lang
How can I solve this problem?
Thanks in advance.
It's not MySQL fault: the data is not being correctly output in your client program. Here is how it looks on my Linux Slackware machine. Native MySQL console:
You see: as soon as we used
SET NAMES latin1
, we got question marks. Try to connect to MySQL, using console application, and useSET NAMES utf8
.As the manual says: