diff -Naur verlihub-0.9.8e-r2/src/cconfmysql.h verlihub-0.9.8e-r2-patched/src/cconfmysql.h --- verlihub-0.9.8e-r2/src/cconfmysql.h 2009-03-14 18:24:56.000000000 +0200 +++ verlihub-0.9.8e-r2-patched/src/cconfmysql.h 2010-03-11 10:29:42.849254472 +0200 @@ -20,6 +20,7 @@ #include "cconfigbase.h" #include +#include #include #include "cmysql.h" #include "cquery.h" diff -Naur verlihub-0.9.8e-r2/src/cdbconf.cpp verlihub-0.9.8e-r2-patched/src/cdbconf.cpp --- verlihub-0.9.8e-r2/src/cdbconf.cpp 2009-03-23 17:18:58.000000000 +0200 +++ verlihub-0.9.8e-r2-patched/src/cdbconf.cpp 2010-03-11 10:23:41.705015757 +0200 @@ -22,6 +22,7 @@ Add("lang_name",lang_name,string("lang_en")); Add("allow_exec",allow_exec, false); Add("allow_exec_mod",allow_exec_mod, true); + Add("db_charset",db_charset,string("utf8")); Load(); } diff -Naur verlihub-0.9.8e-r2/src/cdbconf.h verlihub-0.9.8e-r2-patched/src/cdbconf.h --- verlihub-0.9.8e-r2/src/cdbconf.h 2009-03-23 17:19:47.000000000 +0200 +++ verlihub-0.9.8e-r2-patched/src/cdbconf.h 2010-03-11 10:24:22.047010055 +0200 @@ -31,6 +31,7 @@ string db_user; string db_pass; string db_data; + string db_charset; string config_name; string lang_name; bool allow_exec; diff -Naur verlihub-0.9.8e-r2/src/cmysql.cpp verlihub-0.9.8e-r2-patched/src/cmysql.cpp --- verlihub-0.9.8e-r2/src/cmysql.cpp 2009-04-06 16:26:49.000000000 +0300 +++ verlihub-0.9.8e-r2-patched/src/cmysql.cpp 2010-03-11 10:26:58.097009739 +0200 @@ -33,11 +33,11 @@ /*! \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data) */ -cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL") +cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL") { mDBName = data; Init(); - if(!Connect(host,user,pass,data)) + if(!Connect(host,user,pass,data,charset)) { throw "Mysql connection error."; } @@ -55,10 +55,10 @@ if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: ")); } -bool cMySQL::Connect(string &host, string &user, string &pass, string &data) +bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset) { if(Log(1)) LogStream() << "Connecting to mysql server: " - << user << "@" << host << "/" << data << " using UTF8 encoding" << endl; + << user << "@" << host << "/" << data << "with charset " << charset << endl; mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0); //mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,"utf8"); @@ -66,7 +66,7 @@ mysql_options(mDBHandle, MYSQL_OPT_RECONNECT, "true"); #endif - //mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str()); + mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str()); if(!mysql_real_connect( mDBHandle, diff -Naur verlihub-0.9.8e-r2/src/cmysql.h verlihub-0.9.8e-r2-patched/src/cmysql.h --- verlihub-0.9.8e-r2/src/cmysql.h 2009-05-16 17:46:26.000000000 +0300 +++ verlihub-0.9.8e-r2-patched/src/cmysql.h 2010-03-11 10:27:40.220256720 +0200 @@ -47,10 +47,10 @@ friend class cQuery; public: cMySQL(); - cMySQL(string&host,string&user,string&pass,string&data); + cMySQL(string&host,string&user,string&pass,string&data,string&charset); ~cMySQL(); void Init(); - bool Connect(string &host, string &user, string &passwd, string &db); + bool Connect(string &host, string &user, string &passwd, string &db, string &charset); string GetDBName() { return mDBName; diff -Naur verlihub-0.9.8e-r2/src/cpenaltylist.cpp verlihub-0.9.8e-r2-patched/src/cpenaltylist.cpp --- verlihub-0.9.8e-r2/src/cpenaltylist.cpp 2009-05-16 17:48:00.000000000 +0300 +++ verlihub-0.9.8e-r2-patched/src/cpenaltylist.cpp 2010-03-11 10:30:28.559004554 +0200 @@ -21,6 +21,7 @@ ***************************************************************************/ #include "cpenaltylist.h" +#include namespace nDirectConnect { diff -Naur verlihub-0.9.8e-r2/src/cserverdc.cpp verlihub-0.9.8e-r2-patched/src/cserverdc.cpp --- verlihub-0.9.8e-r2/src/cserverdc.cpp 2009-07-10 21:45:07.000000000 +0300 +++ verlihub-0.9.8e-r2-patched/src/cserverdc.cpp 2010-03-11 10:28:57.267254788 +0200 @@ -87,7 +87,8 @@ mDBConf.db_host, mDBConf.db_user, mDBConf.db_pass, - mDBConf.db_data), // connect to mysql + mDBConf.db_data, + mDBConf.db_charset), // connect to mysql mC(*this), // create the config object mL(*this), mSetupList(mMySQL),