I am trying to insert data from my mother language (Sinhala) into my mysql table. But MySQL
displays my chracters as question marks.
This is how I test it:
CREATE DATABASE sinhala_test;
USE kindheart;
ALTER DATABASE sinhala_test
CHARACTER SET utf8
COLLATE utf8_general_ci
CREATE TABLE IF NOT EXISTS `category` (
`category_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`name_si` VARCHAR(100) COLLATE utf8_unicode_ci NOT NULL,
`description_si` TEXT COLLATE utf8_unicode_ci NOT NULL,
`last_update` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `category` VALUES (1,'පොත් පත් සහ පාසල් උපකරණ','නවතම පොත් පත් අවශ්යතා ඇතුළු සියළුම පාසැල් හා අධ්යාපන මෙවලම්.',NOW());
This is what can I get from MySQL command line:
mysql> select * from category\G
*************************** 1. row ***************************
category_id: 1
name_si: ???? ??? ?? ????? ?????
description_si: ???? ??????? ????/ ?????? ?? ?? ???? O/L, A/L ??????? ?????, ???????, ??????? ????? ?????? ???? ??? ????????. ????/???????/???????????/??????/?????? ????/ ????/????/?????? ????? ?????? ?????? ?? ???????? ??????.
last_update: 2018-05-20 11:11:20
Can anybody tell me how can I fix this problem?
NOTE:
When inserting from phpMyAdmin
its correctly work.