mysql - correct utf-8 characters in phpMyadmin -
i want transfer database server, found utf-8 characters not display correctly in database, displaying this: enter image description here
i use persian language. exported database , used notepad++ convert them didn't work. did convert using notepad++ on subtitles srt files , worked well.
ex: exporting : علیرضا in old & new phpmyadmin (both) displays : اØمدي
solved: open sql file in notepad++, change encoding utf-8 ansi , save it, after opening file in notepad++ or uploading in database allright.
i faced problem earlier while creating record in other language (other english) , tried code:
//connect database //setting character set mysql_set_charset('utf8'); // important //now insert query $sql = "insert ..."; $res = mysql_query($sql);
and in phpmyadmin, selected collation
it worked me.
i hope help.
Comments
Post a Comment