如何在mysql数据库中存储泰卢固语,印地语等印度语言 [英] how to store Indian language like Telugu,Hindi in mysql database

查看:196
本文介绍了如何在mysql数据库中存储泰卢固语,印地语等印度语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能告诉我在Mysql数据库中存储泰卢固语,印地语文本的过程.我尝试过类似的过程

can anyone tell the procedure for storing Telugu,Hindi languages text in Mysql database.I have tried some procedure like

设置名称'utf8';之后,我设置了字符集='utf8',并在数据库级别,表级别以及列级别上整理了utf8_general_ci.但是在将数据插入数据库时​​,它显示????.

set names 'utf8'; and after that i have setted character set='utf8' and collate is utf8_general_ci at database level,table level and also column level.But while inserting data into database it displaying ????.

请为此提供一些解决方案.

please give some solution for that.

推荐答案

对于表的该列的归类,请使用utf8_czech_ci.并在数据库连接结束时使用以下代码.如果有类似的代码,请用下面的代码替换该部分.

For Collation of that column of the table use utf8_czech_ci. And use this below code at the end of your database connection. If there have similar like this portion of code then replace that portion with below code.

mysql_query('SET CHARACTER SET utf8')or die('charset problem:'.mysql_error());
mysql_query("SET SESSION collation_connection ='utf8_general_ci'") or die('collation   problem:'.mysql_error());

因为您需要按列中的归类设置Unicode格式,并且当您必须以Unicode格式获取该数据时,需要使用给定的查询.

Because you need to set the Unicode format by Collation in column and again when you have to fetch that data in Unicode format you need to use the given query.

这篇关于如何在mysql数据库中存储泰卢固语,印地语等印度语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆