I've read in several places that boost::algorithm::to_upper/to_lower are not ok for utf8:
- http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/conversions.html
- How to convert std::string to lower case?
- Working with UTF8
But on my system, ubuntu 12.4.1 32 bits with boost 1.46, and locale en_GB.UTF-8, everything looks fine,as long as I pass the locale Eg:
std::locale englishUTF8locale("en_GB.UTF-8")
boost::algorithm::to_upper_copy(L"ü", englishUTF8locale) -> L"Ü"
boost::algorithm::to_lower_copy(L"и", englishUTF8locale) ->L"И"
What is worth noting is that it works when using std::wstring, but not when using std::string
So, boost::locale is not really necessary? My problem is that I can only use boost 1.46, and locale was created for 1.48