Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Firefox在ASP.net文本框中显示问号(?)而不是Unicode文本,在IE 8.0中显示OK_C#_Asp.net_Firefox_Unicode - Fatal编程技术网

C# Firefox在ASP.net文本框中显示问号(?)而不是Unicode文本,在IE 8.0中显示OK

C# Firefox在ASP.net文本框中显示问号(?)而不是Unicode文本,在IE 8.0中显示OK,c#,asp.net,firefox,unicode,C#,Asp.net,Firefox,Unicode,我们在应用程序中使用Asp.Net文本框。在文本框中,用户可以输入unicode 当我用IE 8.0浏览这个应用程序时,它工作得很好 在文本框中显示Unicode字符 但每当我用Mozila FireFox(V.20.0.1)浏览这个应用程序时。它显示问题 标记(?)而不是Unicode字符(马拉地/Devnagari) 我在web.config文件中实现了如下代码: <system.web> <globalization fileEncoding="utf-8" re

我们在应用程序中使用Asp.Net文本框。在文本框中,用户可以输入unicode

当我用IE 8.0浏览这个应用程序时,它工作得很好

在文本框中显示Unicode字符

但每当我用Mozila FireFox(V.20.0.1)浏览这个应用程序时。它显示问题

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

我在web.config文件中实现了如下代码:

 <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#

这是因为服务器通过HTTP响应头发送内容类型(text/html;charset=ISO-8859-1),在这种情况下,以内容类型为准。页面代码保存时带有一个UTF-8字节顺序标记(ï»?),您在本例中可以看到该标记



谢谢您的回复。我的问题解决了,我以以下方式使用了header部分中的Meta标记: