diff --git a/src/init.cpp b/src/init.cpp index e3966ab1..f079f694 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #ifndef WIN32 @@ -399,6 +401,7 @@ bool AppInit2(boost::thread_group& threadGroup) #endif #endif #endif + std::locale::global(boost::locale::generator().generate("")); // ********************************************************* Step 2: parameter interactions diff --git a/src/makefile.android b/src/makefile.android index 6434e1b6..073d69cd 100644 --- a/src/makefile.android +++ b/src/makefile.android @@ -174,6 +174,7 @@ LIBS += \ -l boost_filesystem$(BOOST_LIB_SUFFIX) \ -l boost_program_options$(BOOST_LIB_SUFFIX) \ -l boost_thread$(BOOST_LIB_SUFFIX) \ + -l boost_locale$(BOOST_LIB_SUFFIX) \ -l db_cxx$(BDB_LIB_SUFFIX) \ -L$(NDK_BASE)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/ -lgnustl_static #-l ssl_static -l crypto_static diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 26d54166..857694b5 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -30,6 +30,7 @@ LIBS= \ -l boost_program_options-mt-s \ -l boost_thread_win32-mt-s \ -l boost_chrono-mt-s \ + -l boost_locale-mt-s \ -l db_cxx \ -l ssl \ -l crypto diff --git a/src/makefile.mingw b/src/makefile.mingw index 3659f520..431bf0d7 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -39,6 +39,7 @@ LIBS= \ -l boost_program_options$(BOOST_SUFFIX) \ -l boost_thread$(BOOST_SUFFIX) \ -l boost_chrono$(BOOST_SUFFIX) \ + -l boost_locale$(BOOST_SUFFIX) \ -l db_cxx \ -l ssl \ -l crypto diff --git a/src/makefile.osx b/src/makefile.osx index ebe621be..98870b1d 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -37,6 +37,7 @@ LIBS += \ -l boost_filesystem$(BOOST_LIB_SUFFIX) \ -l boost_program_options$(BOOST_LIB_SUFFIX) \ -l boost_thread$(BOOST_LIB_SUFFIX) \ + -l boost_locale$(BOOST_LIB_SUFFIX) \ -l db_cxx$(BDB_LIB_SUFFIX) \ -l ssl \ -l crypto diff --git a/src/makefile.osx-bitcoin b/src/makefile.osx-bitcoin index 269460c1..08c967d8 100644 --- a/src/makefile.osx-bitcoin +++ b/src/makefile.osx-bitcoin @@ -50,6 +50,7 @@ LIBS += \ -lboost_program_options-mt \ -lboost_thread-mt \ -lboost_chrono-mt \ + -lboost_locale-mt \ -lssl \ -lcrypto \ -lz diff --git a/src/makefile.unix b/src/makefile.unix index f9c0485b..b6fb07c6 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -38,6 +38,7 @@ LIBS += \ -l boost_filesystem$(BOOST_LIB_SUFFIX) \ -l boost_program_options$(BOOST_LIB_SUFFIX) \ -l boost_thread$(BOOST_LIB_SUFFIX) \ + -l boost_locale$(BOOST_LIB_SUFFIX) \ -l db_cxx$(BDB_LIB_SUFFIX) \ -l ssl \ -l crypto \ diff --git a/src/twister.cpp b/src/twister.cpp index 7fd95099..3da01c60 100644 --- a/src/twister.cpp +++ b/src/twister.cpp @@ -13,6 +13,7 @@ using namespace json_spirit; using namespace std; #include +#include #include #include @@ -1226,7 +1227,7 @@ void updateSeenHashtags(std::string &message, int64_t msgTime) BOOST_FOREACH(string const& token, tokens) { if( token.length() >= 2 ) { string word = token.substr(1); - boost::algorithm::to_lower(word); + word = boost::locale::to_lower(word); if( token.at(0) == '#') { hashtags.insert(word); } @@ -1489,7 +1490,7 @@ Value newpostmsg(const Array& params, bool fHelp) BOOST_FOREACH(string const& token, tokens) { if( token.length() >= 2 ) { string word = token.substr(1); - boost::algorithm::to_lower(word); + word = boost::locale::to_lower(word); if( token.at(0) == '#') { ses->dht_putData(word, "hashtag", true, v, strUsername, GetAdjustedTime(), 0); diff --git a/twister-qt.pro b/twister-qt.pro index 251e0206..0a9a1ebf 100644 --- a/twister-qt.pro +++ b/twister-qt.pro @@ -453,7 +453,7 @@ LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX # -lgdi32 has to happen after -lcrypto (see #681) win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX +LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX -lboost_locale$$BOOST_THREAD_LIB_SUFFIX win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX macx:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX