如何在MySQL中插入印地语 [英] How to insert Hindi language in Mysql
本文介绍了如何在MySQL中插入印地语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我更改了字符集,但不起作用
I changed the charset set but does not work
CREATE TABLE `tbl_hindi` (
`data` varchar(1000) character set utf8 collate utf8_bin default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `tbl_hindi` VALUES ('कंप्यूटर');
推荐答案
数据库的字符集必须为utf8_unicode_ci
.
The charset of the database needs to be utf8_unicode_ci
.
尝试创建一个新的数据库以及一个新的表.
Try creating a new database, as well as a new table.
CREATE DATABASE hindi_test
CHARACTER SET utf8
COLLATE utf8_unicode_ci;
USE hindi_test;
CREATE TABLE `hindi` (
`data` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `hindi` (`data`) VALUES
('कंप्यूटर');
这适用于我的安装.如果它对您不起作用,则您的服务器设置可能有问题.
This works on my install. If it doesn't work for you, something might be wrong with your server settings.
这篇关于如何在MySQL中插入印地语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文