I have a problem with functions in string_algo package.
Consider this piece of code:
#include <boost/algorithm/string.hpp>
int main() {
try{
string s = "meißen";
locale l("de_DE.UTF-8");
to_upper(s, l);
cout << s << endl;
catch(std::runtime_error& e){
cerr << e.what() << endl;
}
try{
string s = "composición";
locale l("es_CO.UTF-8");
to_upper(s, l);
cout << s << endl;
catch(std::runtime_error& e){
cerr << e.what() << endl;
}
}
Expected result for this code:
MEISSEN
COMPOSICIÓN
however the only thing i get is
MEIßEN
COMPOSICIóN
therefore, obviously, language is not taken into account. I am even trying to establish a global language without success. What can I do?
source
share