本文介绍了从文本框中获取印地文字符作为输入并将其存储到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中使用asp.net和c#,将Mysql作为数据库使用.我想在印地语中从用户输入并将其存储在数据库中并检索它.

I am using asp.net and c# in my application and Mysql as Database.I want to take input from user in hindi and store it in database and retrieve it.

当我从Mysql数据库中存储印地文字符时,对我来说工作正常,但是当我使用文本框输入印地文字符时,它向我显示?????????.

When I am storing the hindi characters in from Mysql database it is working fine for me but when I am using textbox to input a hindi characters it is showing me ?????????.

我想问题是aspx页面未设置为支持印地文字符.请告诉我实现该方法的方法.

I guess the problem is the aspx page does not set to support hindi characters.Please tell me the way to achieve this.

推荐答案

我猜想在您的Http请求上使用UTF-8编码,响应会解决该问题.您的Web.config文件中设置为当前的 requestEncoding responseEncoding 是什么?

I guess using UTF-8 encoding on your Http request and responses would solve it. What is your requestEncoding and responseEncoding in your Web.config file set to currently?

< globalization> 标记上查看更多信息:

See more on the <globalization> tag here:

http://msdn.microsoft.com/en-us/library/hy4kkhe0(v=VS.100).aspx

这篇关于从文本框中获取印地文字符作为输入并将其存储到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 01:57