Hi,
I need some help about displaying a std::string with special characters (accent marks, such as á, é, ã, ...).
I tried this to test the sf::string and std::string:
sf::String str;
std::string str2;
...
while (window.pollEvent(event)) {
...
case sf::Event::TextEntered:
str += event.text.unicode;
str2 += event.text.unicode;
...
}
window.draw(sf::Text(str));
window.draw(sf::Text(str2));
The first draw draws correctly, but the second just shows a square for every special character (extended ascii codes, ie, event.text.unicode > 127).
But I need to use the std::string to manipulate strings, thus I can't use the first draw!!! And I can't display the text correctly using this class!!!
Can somebody help me?
PS.: I'm using the SFML 2.0.
Thank you,
Carlos