I found error in mysql++.
I use utf-8 encoding.
This is my code:
char * _login = "ч";
mysqlpp::Query query = con->query();
query << "SET character_set_client=utf8";
query.execute();
query << "SET character_set_connection=utf8"
;
query.execute();
query << "SET character_set_results=utf8";
query.execute();
query
<< "SELECT auth.*, user.*,userref.refuperc as
refrefuperc,authref.login as reflogin "
<< "FROM auth NATURAL JOIN user "
<< "LEFT JOIN user AS userref ON (userref.userid=auth.refid)
"
<< "LEFT JOIN auth AS authref ON (authref.userid=auth.refid)
"
<< "WHERE auth.login=" << mysqlpp::quote << _login
<< " AND
"
<< "(auth.passmd5 = " << mysqlpp::quote <<
output.c_str()
<< ")";
cout << "LOGIN: " << query.str() << endl; <<< here error
query.store(); <<< here it happen also.
I have an error when i try to print query or execute it.
This hapen only if i use "ч" char. With other russian characters all OK.
mysqlpp::Query::store() at /usr/include/mysql++/query.h:467. I can send
backtrace, if you need it.
Victor Dudochkin.