Firefox在ASP.net Textbox中显示问号(?)而不是Unicode Text,在ie8.0中显示OK

本文关键字:显示 Unicode Text ie8 OK Textbox net ASP Firefox | 更新日期: 2023-09-27 18:12:05

Net文本框中的应用程序。在文本框中,用户可以输入unicode

字符(马拉地语/Devnagari)。当我用ie8浏览这个应用程序时,它工作正常,它

显示文本框中的Unicode字符。

但是每当我用mozilla FireFox(V.20.0.1)浏览这个应用程序时。它显示Question

标记(?)而不是Unicode字符(马拉地语/Devnagari)。

我在web中实现了代码。像这样配置文件:

 <system.web>
 <globalization fileEncoding="utf-8"
  requestEncoding="utf-8"
  responseEncoding="utf-8"/>
 </system.web>

但它不工作,

我也试着在页面中遵循代码。

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="search.aspx.cs" 
  Inherits="search"   ResponseEncoding="utf-8" %>

这段代码根本不起作用。

VS2005框架:2.0语言:c#

Firefox在ASP.net Textbox中显示问号(?)而不是Unicode Text,在ie8.0中显示OK

这是因为服务器发送了一个content-type (text/html;charset=ISO-8859-1)通过HTTP响应头,在这种情况下,内容类型占上风。页面代码用您在本例中看到的UTF-8字节顺序标记()保存。

http://web-sniffer.net/?url=http%3A%2F%2Fwww.valuevisionglasses.co.uk& http = 1.1, gzip = yes&类型= HEAD& uak = 0


http://httpd.apache.org/docs/current/mod/mod_mime.html AddType