yazwas
8th January 2010, 20:31
Hello everyone
I have a problem with MySQL and Arabic characters
I use the following line of codes to insert a record to a table
QString name ="يزن";
query.prepare("INSERT INTO stock (name, num) VALUES (:name, 10)" );
query.bindValue(":name", name);
query.exec();
the record is entered successfully, although the name variable is changed to this 'Ã*Òä', as shown in the mysql browser
when I try to retrieve the record from the database, I get ??? displayed on the QLabel object
What should I do so that the value I enter to the database remains the same, i.e. يزن, and when I retrieve it, also displays correctly
Thanks alot for your help
I have a problem with MySQL and Arabic characters
I use the following line of codes to insert a record to a table
QString name ="يزن";
query.prepare("INSERT INTO stock (name, num) VALUES (:name, 10)" );
query.bindValue(":name", name);
query.exec();
the record is entered successfully, although the name variable is changed to this 'Ã*Òä', as shown in the mysql browser
when I try to retrieve the record from the database, I get ??? displayed on the QLabel object
What should I do so that the value I enter to the database remains the same, i.e. يزن, and when I retrieve it, also displays correctly
Thanks alot for your help