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

enter image description here

it worked me.

i hope help.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -