2013-03-26 149 views
3

我面临着以下问题期间查看: 当我一个特定的页面复制到我的新的解决方案:阿拉伯字符运行

在运行时我得到这个!

enter image description here

虽然它的人就像这样在设计的时候:

enter image description here

我的.aspx:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

我尝试使用charset=iso-8859-6代替,但同样的问题! 如何解决这个问题,为什么发生这种情况?

+0

是由浏览器检测到什么编码? (查看 - >字符编码在FF) – 2013-03-26 10:21:10

+0

检查此http://bytes.com/topic/asp-classic/answers/125320-arabic-asp – 2013-03-26 10:25:00

+0

Unicode(UTF-8)' – 2013-03-26 10:37:05

回答

4

几个to后我只是将字符集更改为windows-1252,并且每件事都可以。

像这样:

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> 
1

我尝试使用charset = iso-8859-6,而不是相同的问题!

这意味着您的服务器正在发送带有字符集的实际Content-Type标头。 <meta> -tag仅次于实际的标题。

你可以做到这一点使用:

<%@ Page ResponseEncoding="UTF-8" %> 

Response.ContentType = "text/html; charset=UTF-8"; 

但是,不要只是一味地砍,很容易使用谷歌Chrome开发者工具(或任何你喜欢)看什么头你的服务器发送:

enter image description here