Hello everybody,
I have this text file, and when I import them into mysql through phpMyAdmin, everything is ok, but the persian (Farsi) not shown correctly, also I use ' utf8_persian_ci ' collation, can anyone kindly plz convert this file into MySQL that farsi data shows correctly too?

NOTE:
farsi "persian" is a language

Persian text not shwon at all when I use the utf8_persian_ci...and if I change the collation then persian text shown like attachment

yeah it is ok, if I select the encoding of the window " Arabic (Windows) ", otherwise it is not readable.

if I manually insert the data into MySQL database, then persian text is OK...

any suggestion plz...

I'ld like to draw your attention that it's also related to the hosting server that you're hosting the site on it, cause most of those servers their mysql default character set is MySQL charset: UTF-8 Unicode (utf8) so it's recommended to ask the host server company to change it for you to your charecter set code.

I am using on my own computer not on the server, just i have installed appachi on my pc, also when I create the db I change the collation to "utf8_persian-ci" but the persian word is not imported, the english words are ok...

it's not enaugh to change the collation of the database you have to change the collation for the needed table and the needed field also.
when you chose the database chose the table and click operations and change the collation in the same way chose the table and the needed field and click operations to change the field collation it will show right charecter set

Hello,
I am using Windows local PHP, MySQLO and Apache.

I have the same issue. I have Persian Text on .txt file, when double click and open it, it shows fine but when I insert it into Database , it is unreadable.

I used PHP to just read and display it on the screen, and use:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
on the page, it just shows questions marks ????????????????? instad of the text.
I opened the source of the page in Internet Explorer and it shows the same ??????????????????????????? instead of the.

use this

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
and also use 
<body lang="far" dir="rtl">
This article has been dead for over six months. Start a new discussion instead.