Hello,
Ive been searching lately for a solution, i havnt found yet, for a problem using Textentered event and android virtual keyboard.
The std::string doesnt seem to recieve over 128 unicode characters, specially arabic letters and the erase to the lift button (U+232B).
I tried using wstring and fonts that support these characters, i even tried using sf::String and convert it to wide string, but the problem persist.
Here is my code, last edited, showing only whats related to my issue:
// after enabling the virtual keyboard
wstring str0;
sf::Text txt0;
if (event.type == sf::Event::TextEntered)
{
if (str0.size()<=15) str0+=event.text.unicode;
if (event.text.unicode==L'\n')
{
str0.erase(str0.size()-1, 1);
}
if (event.text.unicode==L'\u232B')
{
str0.erase(str0.size()-2, 2);
}
txt0.setString(str0);
}
this code works with English letters and the enter button in the virtual keyboard, but it doesnt work with arabic nor the erase to the left character.
Note: im testing this only on Android, using a HUAWEI device with Android 8 OS.