Im building a website for a photographer with fans speaking three rather different languages, English, French and Arabic.
I can not for the life of me get the Arabic to display! It shows fine in MySQLmyAdmin and if I hardcode the Arabic into the HTML it displays properly, but I can't retrieve it from the database.
Heres a sample page:
Code: Select all
<?PHP
mysql_connect('localhost','*********','*********');
mysql_select_db('nour_nour');
setlocale(LC_ALL, 'ar_AR');
header('Content-Type: text/html; charset=UTF-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<title>Language test</title>
</head>
<body>
<?PHP
$t = mysql_query("SELECT * FROM translations WHERE name = 'website tagline' LIMIT 1");
echo "English: " . mysql_result($t,0,"english")."<br />";
echo "Français: " . mysql_result($t,0,"french")."<br />";
echo "??????? " . mysql_result($t,0,"arabic")."<br />";
echo mysql_error();
?>The whole database has been set to UT8-Unicode and yet the Arabic just WILL**NOT**DISPLAY.
Its driving me nuts!
