Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-08-2007, 01:48 AM   #1
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
query mysql using PHP for Persian

For the first time, I tried to do some work in Persian(farsi) which is pretty much like Arabic.

I added some data to myswl using phpmyadmin and I set utf8_persian_ci as the collation for my char field. I can see everything normally on phpmyadmin, but when I query my table everything looks like "????"

Any idea how can I make it working?
Old 07-08-2007, 09:52 PM   #2
Senior Member
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Is the display problem from the terminal? If so have you configured the terminal to display the persian font? When I configure MySQL for such tasks I tend to use UTF-8 rather than a language specific collation. The reason is that UTF-8 is a much wider encoding. I have certainly got Arabic scripts working (Dari & Pushto) whilst using MySQL.
Old 07-08-2007, 09:56 PM   #3
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
Basically I used phpMyadmin to insert data to my database. I tried to insert data from the terminal and it worked fine. Now I can see all text correctly in browser, although they don't look correct in phpMyadmin.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm trying to get PHP to filter results from a MySQL query!!! Tom "Techno" Earl Programming 4 07-18-2011 06:49 AM
php mcrypt cookie - mysql query lemack Linux - Security 3 02-09-2005 09:21 AM
php/,mysql problem: can't query JJX Linux - General 4 01-06-2005 05:10 PM
php: Why Can't I Query Mysql DB?? flamesrock Programming 7 11-16-2004 12:36 AM
PHP MySQL Query Question vi0lat0r Programming 1 07-15-2004 05:02 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration