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.
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.