Well, I had my text input working great before upgrading:
- Windows (Vista -> 7)
- SDL (IDK -> 1.2.14)
Now these characters: (?, `, ~, ^, ?) are being treated like english-only characters.
I mean, sometime ago when I pressed the ? key, it just waited for the next keypress, if the next char can’t be combined with ?, then it prints both side by side, if it can (an A for example) it should print ?.
But now they’re just being printed like any other “normal” character, no more “waiting for the next char” thing.
So I’m wondering what could possibly be wrong.
This is what was working before:
Code:
wchar_t wc = keysym.unicode;
char buf[4] = {0};
if (wc < 0x80)
{
buf[0] = wc;
}
else if (wc < 0x800)
{
buf[0] = (0xC0 | wc >> 6);
buf[1] = (0x80 | wc & 0x3F);
}
else
{
buf[0] = (0xE0 | wc >> 12);
buf[1] = (0x80 | wc >> 6 & 0x3F);
buf[2] = (0x80 | wc & 0x3F);
}
text.insert(cursor, buf);
Thanks!