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?

farsi "persian" is a language

what was wrong with the persian text?

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

i made a test script to see if it worked with my database. it worked just fine, the text looked a little different but its still the same. have you echoed the info to a page to see if its the same? look here.

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

Thnx much all...

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">
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.