LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-08-2007, 01:48 AM   #1
mohtasham1983
Member
 
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


Hi,
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
graemef
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
mohtasham1983
Member
 
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.
 
  


Reply


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


All times are GMT -5. The time now is 06:11 PM.

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