SFML community forums
Help => Window => Topic started by: iride on April 27, 2016, 05:18:23 am
-
Sometimes I get weird symbols like � through TextEntered
How to filter these out?
-
Where you gets those symbols, printed by the SFML text class or by the system console?
-
Do they appear with specific keys or randomly?
-
Sorry it's not that symbol. It's just a square.
For example, I press ctrl + a and display the character in sf::Text and I see a square.
-
Ctrl + <letter> produces an ASCII control character (CTRL + A gives the "start of heading" character, ASCII code = 1). Those are not printable and can easily be filtered out with the std::isprint standard function.