我正在尝试创建一个页面,以不同的语言显示内容,但内容在页面上只显示为 ??????? 。
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar">
<head>
<title>Arabic Quran</title>
<meta name="Author" content="Mustafaa Hanafi"/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-language" content="AR"/>
<meta name="Keywords" content="hadith bukhari, sahih Bukhari, the hadith of the prophet, ahadith, ahadees, hadees, hadist, saheeh bukhari, hadist bukhari, the hadith, bukhari hadith"/>
<meta name="Description" content="Sahih bukhari hadith narrations and translation in english, it is one the most authentic collection of hadith, view the hadith by narrator or search"/>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
我将其包含在元标记中,如果我对此标记的阅读是正确的,则应使其以阿拉伯语显示内容。我将在下面提供我的问题的屏幕截图。
答案 0 :(得分:2)
页面阿拉伯语古兰经视觉将lang="ar"
添加到html
标记,如此
<html lang="ar">
...
</html>
或在首次连接到您的数据库时尝试此操作:SET CHARACTER SET utf8
$MySQL_Handle = mysqli_connect(HOSTNAME,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME)
or die ( mysqli_error($MySQL_Handle) );
$sSQL= 'SET CHARACTER SET utf8';
mysqli_query($MySQL_Handle,$sSQL)
or die ('Can\'t charset in DataBase');