2013-03-26 150 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