I read in several places that speed up :: algorithm :: to_upper / to_lower are not suitable for utf8:
But on my system, ubuntu 12.4.1 is 32 bits with boost 1.46 and locale en_GB.UTF-8, everything looks fine if I pass the locale. For instance:
std::locale englishUTF8locale("en_GB.UTF-8") boost::algorithm::to_upper_copy(L"ΓΌ", englishUTF8locale) -> L"Γ" boost::algorithm::to_lower_copy(L"", englishUTF8locale) ->L""
It is worth noting that it works when using std :: wstring, but not when using std :: string
So, boost :: locale is not really needed? My problem is that I can only use boost 1.46, and the locale was created for 1.48
source share