lem-project/lem

SDL2: Typing Cyrillic characters doubles them

PracticallyNothing opened this issue · 0 comments

  • This only affects the SDL2 frontend - the ncurses frontend correctly inputs only one cyrillic character per pressed key.
  • The characters are actually in the buffer - it's not just a visual bug.
  • I don't know if this happens in other languages/character sets (e.g. CJK)
  • Caught on Fedora Linux 40, Gnome 46 (wayland), SDL2 version 2.30.3

At commit 0de0da6 (current HEAD as of writing), when typing any cyrillic characters, they seem to be entered twice. ASCII characters don't seem to be affected.

Here's an example. On the left are the keys I pressed on my QWERTY keyboard. On the right are the results when using the Bulgarian Traditional Phonetic layout to press the same keys:
Lem SDL2 - typing cyrillic characters

Here's the same exercise done in a terminal, using the ncurses frontend. This is the expected result:
Lem ncurses - typing cyrillic characters

Note that this isn't just a visual bug - the duplicated characters are actually in the buffer. cat-ting out the file prints them and pressing Backspace deletes just one character.
Lem SDL2 - catting out the cyrillic text file