Try / Tempest

3d graphics engine
MIT License
83 stars 24 forks source link

[Linux] Unable to decode üöä #37

Closed matthiakl closed 1 year ago

matthiakl commented 1 year ago

Trying to type non-ASCII characters (e.g. ü ö ä) in the G2 save menu causes the game to freeze. It enters an infinite loop here, because l remains 0: https://github.com/Try/Tempest/blob/783c650d3e9d18105d7eb4bda13007c07ab64d00/Engine/utility/textcodec.cpp#L47-L49 ü gives the code 0xfc on Linux since XLookupString returns latin-1 encoding, not utf8.

Try commented 1 year ago

Right... Don't have great ideas of proper fix right now - will comeback to this eventually

matthiakl commented 1 year ago

Now the game does not freeze, but no characters are shown.

Xutf8LookupString(xic, &xev.xkey, txt, sizeof(txt)-1, ksym, &status); only returns the char in txt on KeyPress, but on KeyRelease it is empty, resulting in an empty code in GameMenu::SavNameDialog::keyUpEvent

Try commented 1 year ago

Fix should be already in opengothic upstream. Closing