2013-02-12 38 views
1

嗨,我正在創建阿拉伯語網站。但問題是它不支持阿拉伯文內容。它來了 ???????????? 。即使我在.htaccess中輸入charset =「utf-8」。我也把元標籤放在每一頁中。我將這些文件保存爲utf-8支持文件格式。即使我把那裏阿拉伯語所示header('Content-Type: text/html; charset=utf-8'); MySQL存儲數據,但如果我把一些阿拉伯語言的標籤,它不會支持不支持阿拉伯語網頁內容

有人對本略知一二,因爲這是我的冷杉阿拉伯語網站。

+0

的問題是當你使用PHP插入數據? – 2013-02-12 05:21:43

+0

參考此鏈接,您將會對編碼有所瞭解:http://kunststube.net/encoding/ – 2013-02-12 05:22:49

+0

@Akam請訪問這個網站www.aldaleelinstitute.com/ar/ – ukdub 2013-02-12 05:25:53

回答

0

嘗試用在begning

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-6"> 

或者你可以嘗試一下用以下步驟添加元字符集的阿拉伯語: -

Displaying Arabic text using PHP 

1. Don't use the short tags <? ?>. Use the full tags <?php ?> 

2. Remove the quotes and semicolon from the first line and others that are outside the php tags 
"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">"; 

3. Close the span tag <span lang='ar-kw' 

4. Make sure save the file with utf-8 encoding. You might be saving it with another coding. 
+0

爲什麼要在非英文頁面上指定'EN'的文檔類型? – tadman 2013-02-12 05:31:00

+0

編碼是好的,看到有網站上的阿拉伯語文本(靜態),而動態文本從數據庫沒有顯示... – 2013-02-12 05:39:40

+0

@ScoRpion在其工作在第一頁,但我複製並通過代碼其餘頁面無法正常工作。 – ukdub 2013-02-12 05:59:06

0

你可能會希望額外的名稱添加到您的HTML 。例如,如果您使用的是HTML 5,它看起來像:

<!DOCTYPE html> 
<html> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
: 
your content here 
: 
+0

這不是解決方案請參閱頁面的源代碼沒有有效的文本! – 2013-02-12 05:34:37

+0

對不起,當我開始這個答案時,該頁面的鏈接不存在,並且在我輸入時沒有注意到。 – 2013-02-12 05:45:06

1

更改字段排序規則的結構:UTF8 general CI