Getchar bug on Linux?
Archives Forums/Linux Discussion/Getchar bug on Linux?
| ||
Example code:Graphics 640,480,0 Local key:Int Local char:String Repeat Cls key=GetChar() If key>32 Then char=Chr$(key) DrawText char,10,10 Flip Until KeyHit(KEY_ESCAPE) This on Windows returns correctly chars like "ç", "Ç", "á", "É", etc - commonly used in Brazilian names/words. But on Linux, pressing those keys on the keyboard shows nothing at all (only on Blitzmax, on other programs it works normally). I really need a fix for this, since I need to read players names on my game. Have anyone experienced such thing? Is there a work-around? |
| ||
I think it's because it's unicode. Not sure there's a fix. |
| ||
I don't understand how this would work on windows. I thought default font in graphics came from "blitzfont.bin" which I presumed was ascii only at this time. |
| ||
try the following change in system.mod/system.linux.c[126]:unsigned char mybuffer[16]; however the call to XLookupString further down looks like it could do with a unicode upgrade for things to work beterer. |
| ||
Yes, unsigned char fixes "ç", but still, chars like "é" or "ã" (which needs two keystrokes) doesn't :( |