#157 Cannot put stresses at greek letters


Installed the 0.9.21c version of Tux Paint under Windows 7 64bit Pro (English Version). When I tried to write a couple of greek words in the program, I realisded that I cannot put stresses to the words! I attached a screenshot.

Processor: Core 2 Quad Q9300
VGA: nVidia GForece 9600GT
Windows 7 64bit Pro (English) up to date (UAC Activated)
Screen resolution: 1920x1050


  • lefteris008

    A screenshot of the bug

  • I don't actually know anything about Greek, but a quick Google suggests to me that the stresses are, for example, ά, Ά, έ, Έ, η, Ή (stressing α, Α, ε, Ε, η, Η, respectively).

    If that's the case, then I'm able to enter stress characters in Tux Paint in CVS as of today (what will become 0.9.22) (and I imagine it works fine in 0.9.21 as well, since I don't believe anything related to this has changed).

    In KDE on Ubuntu 9.04, I'm using the "KDE Keyboard Layout Switcher", which simply calls "setxkbmap" with "-layout gr". When in Greek mode, if I type the [;] key on my keyboard (right of the [L] key), and then type a vowel key ([A], [E], [H], etc.), the characters shown above appear.

    This is true in Kate (KDE text editor), Google Chrome (browser I'm using to access SourceForge.net Tracker right now), and Tux Paint (regardless as to whether I ask Tux Paint to run with its UI translated to Greek). See attached screenshot. I'm not sure how you enter Greek characters in Windows 7, but if it works in a program like Notepad, Word or your web browser, try using the same keystrokes in Tux Paint's 'Text' tool. If that doesn't work, then please let us know.

    Also, if the characters I'm talking about (ά, Ά, etc.) are not the 'stressed' characters that you're talking about, then please accept
    my apology. It'd help if you provide more information. I doubt it, but it may be necessary to add some Greek input method (IM) support to Tux Paint.

    Thanks in advance!

  • Tux Paint CVS (0.9.22) on Linux with stressed vowels in Text tool

  • lefteris008

    Yeah, that is correct, the letters which are "stressed" in Greek, are all vowels (that is ' α ', ' ε ', ' ι ', ' υ ', ' η ', ' ο ', ' ω ' like ' ά ', ' έ ', ' ί ', ' ύ ', ' ή ', ' ό ', ' ώ ') and the "process" of "stressing" letters is pressing the key next to 'L' in all keyboards (the ";/:" key) and then typing the desired letter. E.g., to "stress" ' α ' you've just to press the ";/:" key and then type ' α '; you'll take ' ά '. This process, does not work in Tux Paint. It leaves them "unstressed". Unicode currently supports all Greek characters, including all "stressed" letters. The "stressed" letters are also capital (e.g. ' Ά ').

    Note that the process I described you, works not only in Windows 7 but everywhere; that is, all Windows versions (beginning 3.1), Mac OS, Linux etc. It is the "official" process.

  • Ok, it's interesting that it doesn't work for you on Windows 7, while it does work for me under Linux. Looping John Popplewell in, to see if he can confirm. I'll also ping the libSDL mailing list.

  • I just tried the checkkeys test program in SDL on Windows XP with the Greek keyboard selected. It generates the same code for 'a' as it does for ';a':

    Key pressed: 97-a (0x3B1) modifiers: NUM
    Key released: 97-a modifiers: NUM
    Key pressed: 59-; (0x384) modifiers: NUM
    Key released: 59-; modifiers: NUM
    Key pressed: 97-a (0x3B1) modifiers: NUM
    Key released: 97-a modifiers: NUM

    I can take a look at it,

  • I had a look at the relevent SDL key handling code and added some tracing. In its current state it doesn't handle dead-key + key sequences correctly and I didn't manage to get it to work.

    Currently, even the (unused by SDL) WM_CHAR message is just receiving ASCII characters. I changed the window creation code and associated functions to use the W versions of the functions and WM_CHAR started receiving 16-bit characters but the dead-key + key processing still wasn't working so I gave up for a bit.

    I'll have another try tonight, I think I might need to call the rest of the W functions, wish me luck!

  • John - Are your comments related to just the Win32 version of SDL? (Like I said, I seem to be able to compose stressed Greek characters under Linux; SDL 1.2.13)

  • Yes, it's a win32 specific problem in SDL. It should 'just work' but SDL, for reasons to do with getting the raw key press/release messages, seems to be sabotaging the automatic handling of the dead character + character sequences.

    I made a small non-SDL test program, and, if the main window is created as a Unicode window instead of an ASCII window (if those are the correct terms, basically using the W or A versions of the win32 functions) then the dead-character + character handling is automatic.

    Still looking into it

  • lefteris008

    So, this is only a Windows problem. When you fix that, you will include this mini-update in 0.9.22 or into a later version?

  • The problem is the win32 function ToUnicode() which messes up the dead-key decoding. Not found/figured out a solution yet, although it's a problem others have encountered.

  • lefteris008

    I see, that's OK.

  • Some feedback from John P. on Jan. 27th:
    "no easy fix that I can see. SDL-1.3 has a redesigned mechanism I believe, but I think I can get SDL-1.2 to work by making a relatively complex change, one that would probably not be accepted by the maintainers."

    So we might be stuck with this issue on the Win32 side. It'd be interesting to know if other libSDL-based apps that accept text input (and that should accept Greek) work properly on Windows, or if they only work right on Linux. (It'd also be good to know if this issue affects Mac OS X.)

  • lefteris008

    How could I know whether an application uses the libSDL? I would be grateful to test it.

    P.S.: I cannot test it on MacOS X but, I recently checked it out on Ubuntu 10.04. The keyboard is fine, except the case in which the user put stress and diaeresis on the letter " ι ". (That is: " ΐ", meaning " ΄ " and " ¨ ".

  • GunChleoc

    I can report the same problem for Scottish Gaelic - à is displayed as `a etc. So, it seems to be a general problem with combined keystrokes to create a letter.

  • Please test this in 0.9.22 (RC3 was posted the other day, first official is coming as soon as someone (e.g., Shin-Ichi) builds it for me!)