阿拉伯语将记录保存到sql数据库 [英] Arabic save record into sql databse

查看:250
本文介绍了阿拉伯语将记录保存到sql数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个使用c#asp.net的Web应用程序.输入阿拉伯语名称或字符时,将其另存为???? ??????.

任何的想法.我更改了文本框的大多数字体,但没有成功.

在此先感谢

ahmad zrin

解决方案

与字体无关,字符编码在某处出错.第一步是确保您的阿拉伯文本字段使用正确的排序规则.可以在这里找到很好的介绍 SQL Server和阿拉伯语语言 [ ^ ].您应该直接在数据库中执行测试插入.
我不认为这会解决*现有*记录,但是我很可能会错,我在家中的测试设备无法让我轻松地尝试这一点.希望我对此有误.

您可能遇到的另一个问题是您的服务器正在将http请求中的阿拉伯语解释为欧洲编码之一.这不太可能,但是如果将默认请求编码设置为utf8,则应该可以.
如果数据库上的排序规则失败,则只需检查请求编码.


hi
i have a web application using c# asp.net. when entering arabic names or characters it save them as ???? ??????.

any idea. i change most of fonts for the text box but no success.

thanks in advance

ahmad zrin

解决方案

It''s nothing to do with fonts, the character encoding is going wrong somewhere. The first step is to ensure your Arabic text fields use the correct collation. A pretty good introduction can be found here SQL Server and Arabic Language[^]. You should perform a test inserts directly into the db.
I don''t think this will fix *existing* records, but I could well be wrong, my test rig at home won''t let me try this easily. Hopefully I am wrong about this.

The other problem you might be having is that your server is interpreting the Arabic in the http request as one of the European encodings. This is less likely, but if you set the default request encoding to utf8, you should be OK.
You only need to check the request encoding if collation thing on the database fails.


这篇关于阿拉伯语将记录保存到sql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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