@gemswebsauthorDec 01.2013 — #Check your database encoding. The database encoding must be specific to Arabic if you intend to store Arabic characters.[/QUOTE]
Well.. i am inserting in the same field..
When i insert arabic from the website form it appear well..
But when i insert from my form [B]( the same word into the same field in the database )[/B] it turns to bad encoding
@firesnakerDec 02.2013 — #I see, well, encoding is a difficult problem. One way I can think of is to make sure all encoding are the same, from the html, php, apache and mysql.
So, check your html file vs the website html file for encoding meta tag. See if there is any different.
Then, if you are on different server, development vs production, check for the locale encoding environment.
Of course, since you say they are from the same database, checking mysql encoding is not necessary.
If, all the above fails, you have a tricky problem.
Google is not much help. But I found a link related to MySQL that maybe of interest:
$string = "مرحبا أصدقائي جيدة"; //$string = urlencode($string); //can be good also
$query = "INSERT INTO <span><code>arabic_table</code></span> (<span><code>string</code></span>) VALUES ('{$string}')"; $mysqli->query($query);
$select = "SELECT <span><code>string</code></span> FROM <span><code>arabic</code></span>"; $querys = $mysqli->query($select);
if ($result = $querys) { while ($row = $result->fetch_row()) { mb_check_encoding($row[0], 'utf-8'); echo $row[0] . "n"; } $result->close(); }
also rember to make sure that the display page has these <i> </i><html dir="rtl" lang="ar"> <meta charset="utf-8">