如何在MY sql数据库中保存印地语字符 [英] How to save Hindi character In MY sql database

查看:95
本文介绍了如何在MY sql数据库中保存印地语字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Window Application(C#),数据库是MY SQL。在应用程序中我正在获取gmail收件箱并将其保存到数据库中。但我的问题是,当我在代码主题或消息列中使用插入查询时显示印地语中的消息,但当它保存在数据库中时它显示字符????????像这样。我已经在我的sql中更改了utf8中的所有内容。



当我使用My sql编辑器插入相同时它保存在印地语字体中。这对我来说是一个奇怪的情况,因为我是MY SQL的新手。

这可能是Window Application的问题,但是在app.config文件中也设置了Utf8。

I am working in a Window Application(C#) and database is MY SQL. In Application I am fetching gmail Inbox and save it in to Database. But My problem is that When I am using Insert Query in code "Subject" or "message" column showing message in Hindi but When Its save in Database Its showing character ???????? like this. I already change all things in utf8 in my sql.

And when I Insert same using My sql editor Its saves in Hindi Font. That''s a weird situation for me as I am new to MY SQL.
Can It be problem of Window Application but also there is Utf8 set in app.config file.

推荐答案

你必须在服务器上设置Collat​​ation。



其中一些链接应该对你有所帮助 -

http://dev.mysql.com/doc/refman/5.0/en/ locale-support.html [ ^ ]

http://www.yaldex.com/mysql_manual/ch05s10 .html [ ^ ]

http://dev.mysql.com/doc/refman/4.1/ en / locale-support.html [ ^ ]
You have to setup Collatation on the server.

Some of these links ought to help you -
http://dev.mysql.com/doc/refman/5.0/en/locale-support.html[^]
http://www.yaldex.com/mysql_manual/ch05s10.html[^]
http://dev.mysql.com/doc/refman/4.1/en/locale-support.html[^]


首先,您需要使用Unicode SQL数据类型,例如 nchar nvarchar ntext

< a href =http://msdn.microsoft.com/en-us/library/ms191200%28v=sql.100%29.aspx> http://msdn.microsoft.com/en-us/library/ms191200 %28v = sql.100%29.aspx [ ^ ]。



请参阅我对该问题的评论。



-SA
First of all, you need to use Unicode SQL data type, such as nchar, nvarchar, ntext:
http://msdn.microsoft.com/en-us/library/ms191200%28v=sql.100%29.aspx[^].

Please see my comments to the question.

—SA


这篇关于如何在MY sql数据库中保存印地语字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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