Forum Moderators: coopster

Message Too Old, No Replies

Insert Arabic in Mysql problem

Works fine if inserted manually

         

smagdy

9:10 pm on Dec 30, 2006 (gmt 0)

10+ Year Member



Hello,

I display arabic text using php(V.5) b4 inserting it exactly to mysql(New version) and it displays fine.

If i insert the arabic text manually to mysql using PHPMyAdmin then it displays right also.

But if i insert it to mysql using PHP then it shows as عليكم

I googled a lot and i put all the required stuff as meta tags and choosing the right collation in mysql (UTF8-Unicode) but still shows wrong!

I also added this after connecting to DB:
mysql_query("SET NAMES 'utf8'",$s);

Any solution?

Thanks in advance

smagdy

9:53 pm on Dec 30, 2006 (gmt 0)

10+ Year Member



Thanks it was solved by adding:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

I added it in the begining then removed it and so on..

but now everything works fine!