Thank you for your help Laurent.
Seems that sf::String::fromUtf8 is new in SFML 2.2, I'm using 2.1 in my Linux box so I tried to mimic what it does using sf::Utf8::toUtf32 but this seems that doesn't work directly with Glib::ustring:
/usr/include/SFML/System/Utf.inl:60:15: error: no match for ‘(operand operator+’ types are ‘Glib::ustring_Iterator<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >’ and ‘int’)
So I tried to simulate the behaviour with this code:
Glib::ustring text = "Text: ñáéíóúö";
std::basic_string<unsigned int> buffer;
std::basic_string<unsigned int> basic_string;
Glib::ustring::iterator iter;
for (iter = text.begin(); iter!= text.end(); ++iter)
{
buffer.push_back(*iter);
}
sf::Utf8::toUtf32(buffer.begin(), buffer.end(), std::back_inserter(basic_string));
sf::String sf_string(basic_string);
But when I use sf_string in a sf::Text, got the same result as I show in my previous post.
Any hint on this?
Greetings.