ASP.NET GridView非英语字符问题 [英] ASP.NET GridView non-English character problem

查看:88
本文介绍了ASP.NET GridView非英语字符问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的页面中,我显示土耳其语字符,但这在GridView中是一个问题,但在其他控件中都没有.我在调试模式下跟踪了代码,以查看何时显示土耳其语字符.我从数据库中选择数据,但那时一切都很好.当我逐步执行以下操作时:

gridview.DataSoruce = dt;
gridview.DataBind();

我看了gridview.Rows的数据,发现土耳其语字符弄乱了.

但是可以正确看到浏览器网格的数据.发布页面时,我在背后的代码中看不到正确的单词?

有谁能够帮助我 ?

注意:我尝试过:

In my page, I show Turkish characters, but it is a problem in the GridView, but not in any othe controls. I traced my code in Debug mode to see when a Turkish character is displayed. I select my data from the database, but at that time, everything is fine. When I step through these lines:

gridview.DataSoruce = dt;
gridview.DataBind();

I look at gridview.Rows''s data, and I see Turkish characters messed up.

But the browser grid''s data is seen correctly. When posting the page, I cannot read the correct word in the code-behind?

Can anybody help me ?

Note: I tried:

<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
    <!--<globalization
            fileEncoding="ISO-8859-9"
            requestEncoding="ISO-8859-9"
            responseEncoding="ISO-8859-9"
            culture="tr-TR"
            uiCulture="tr-TR" />-->



但这不起作用.

我想详细说明.
我的长笛角色是Ç"
它是ascii值:199
在浏览器上,我在gridview的列上看到Ç",但是当我查看浏览器的源代码时,看到了



But it doesn''t work.

I wat go give detail info.
the character I have troube is ''Ç''
and it is ascii value : 199
at browser I see ''Ç'' at gridview''s column but when I look view source of browser I see

''Ç''

->. ASCII值的HTML数是199.
当我发布该页面时,我读的是

--> Html number of ascii value is 199.
and when I post the page I read

''Ç''

而不是Ç.

推荐答案



在查看源代码时,您正在查看的内容是等同于字符的HTML编码,Web浏览器使用其各自的引擎在各自的屏幕上显示输出,并且基于html编码进行显示.

请参考以下URL/链接,这肯定会解决您的问题.
http://tlt.its.psu.edu/suggestions/international/web/tips/langtag.html

上面的链接为全球化提供了一些非常好的标准,并为多语言Web应用程序提供了一些要点.


希望这对您有帮助...

谢谢,

阿迪尔...:))
Hi,

What you are viewing while viewing the source is the HTML encoded equivalent of a character, Web browsers use their respective engines to display output on their respective screens and it based on the html encoding.

Please refer the following URL/link, this will surely solve your problem.
http://tlt.its.psu.edu/suggestions/international/web/tips/langtag.html

Above link provides some very good standards for globalization and has some good points to be considered for multiligual web application.


Hope this will help...

Thanx,

Adil...:))


这篇关于ASP.NET GridView非英语字符问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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