MySQL Forums
Forum List  »  Connector/C++

Unicode
Posted by: Yuri Roibu
Date: August 18, 2010 02:35AM

Hello dear all.

i have a project running with mysql database, all was fine till the moment when i was have to take the UTF-8 values from my database,

the problem is next :

when im trying to get an value from mysql database (Database supports the UTF8 and the default charset are set properly)but i cant take the unicode values in string .

for example i make a query:


query << "select * from customers";
mysqlpp::StoreQueryResult res = query.store();

and later i use 1 of the values which is not english in my database

i will assume that in the customers i have a field text which have unicode value

mysqlpp::String SomeString = res[0]["text"];

after this if im trying to cout the value or insert it in the database i see only '???????'

my question is how can i make the C ++ or mysql++ library to work normaly with unicode values?
if is possible and somebody has an answer for that please give it with a small example , im a self learning and sample are really prefferable.

Options: ReplyQuote


Subject
Views
Written By
Posted
Unicode
2432
August 18, 2010 02:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.