MySQL Forums
Forum List  »  Full-Text Search

Re: FULLTEXT & Arabic
Posted by: Stephen Savage
Date: October 13, 2005 12:24PM

Hi Yosri,

I've just used NaviCat to convert a test table with Arabic and English fields to MySQL. It displays properly in NaviCat when I open the table. However, when I try to use PHP to read the table and create a web site I get the dreaded ??? instead of the Arabic text. I have the browser (IE 5) set to use Arial Unicode MS as the font for Arabic, have the charset to utf-8, and use utf8_decode on the Arabic field, but nothing works. Can you help me out?



The PHP code is shown here:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>The GAIA Lab Iraq Test Application</TITLE>
<BODY text=#510000 vLink=#999966 aLink=#cc9933 link=#996633 bgColor=#ffffcc background=header_files/glotextb.gif>
<font face="Arial Unicode MS"></font>

if ($sortby!="")
$sorted = " order by $sortby ";
$bareQuery = "select English,Arabic from architecturecomponenttypes WHERE ArchitectureComponentTypeId < 11";
$queryall = $bareQuery.$sorted;
$resultall = MYSQL_QUERY($queryall);
$numberall = mysql_Numrows($resultall);

if ($numberall==0) {

echo "No Records Found !";

else if ($numberall>0) {


<h3>List of Architecture Component Types </h3>
<table border=0 cellspacing=0 cellpadding=10>
<td><b><a href="<? echo $PHP_SELF; ?>?sortby=English">ENGLISH</a></b></td>
<td><b><a href="<? echo $PHP_SELF; ?>?sortby=Arabic">ARABIC</a></b></td>

while ($x<$numberall)
// Changing Background color for each alternate row
if (($x%2)==0) { $bgcolor="#DEDEBC"; } else { $bgcolor="#CCCC99"; }

// Retreiving data and putting it in local variables for each row
$Arabic = utf8_decode($Arabic);

<tr bgcolor="<? echo $bgcolor; ?>" height=30>
<td> <? echo $English; ?> </td>
<td> <font face="Arial Unicode MS" lang="ar"> <? echo $Arabic; ?></font> </td>
} // end while

} // end if numberall > 0
<!--msthemeseparator--><img src="../_themes/global/glohorsa.gif" width="100%" height="10"><br>
<!--mstheme--><FONT face="Arial Unicode MS" size="1" color=#666633>
Geo-Archaeological Information Applications Lab<br>
School of Human Evolution and Social Change<br>
Box 872402<br>
Arizona State University<br>
Tempe, AZ 85287-2402<br>
Webmaster - <A HREF=""></A></FONT><br>

Options: ReplyQuote

Written By
July 31, 2005 10:07AM
September 19, 2005 03:08AM
Re: FULLTEXT & Arabic
October 13, 2005 12:24PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.