On 1/29/07, Al-Faisal El-Dajani <[EMAIL PROTECTED]> wrote: > > Hello guys, > > I'm facing an encoding problem, and i seriously can't think of other ways > to solve it. > > I created my database, all tables have charset=utf8 and > collation=utf8-unicode-ci. > MySQL's my.cnf file contains default-character-set=utf8 and > character-set-server =utf8 and collation-server=utf8-unicode-ci > All my output files have charset=utf8 in <head> > My broswer is set to encoding unicode(utf8) > > Now all data that is arabic in my DB, show in arabic through the shell and > phpmyadmin, but on my site, it shows as gibberish. And all that data i enter > from my site, appear in arabic on the site, but gibberish in the shell and > phpmyadmin. Where is the problem??? what did i forget to do? > > -- > Al-Faisal El-Dajani > Phone: +962-7-77 799 781 > P.O Box: 140056 > 11814 Amman, Jordan > > >
And btw, why are you doing the config as follows: $CFG->dbhost = 'localhost'; $CFG->dbuser = 'faisal'; $CFG->dbname = 'faisal'; $CFG->dbpass = '123'; include 'sql.class.php'; $db = new Database(); I would assume that your db class reads the options from the $CFG object. You're abusing a few programming concepts here, it would be better if you do the following: include 'sql.class.php'; $CFG->dbhost = 'localhost'; $CFG->dbuser = 'faisal'; $CFG->dbname = 'faisal'; $CFG->dbpass = '123'; $db = new Database($CFG); And honestly, I see no point in making configuration an object, for your scenario an assoc. array should be fine. - Ammar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Jordan PHP Users Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/JoPHP http://Jolug.org/ -~----------~----~----~----~------~----~------~--~---
