Comment 14 for bug 671923

Revision history for this message
Nokir (nokir) wrote :

XLockupString() does (in contrary to the documentation) respect the locale-settings. I startet xev with three different LC_ALL settings and pressed the euro-key each time (see below).

You're right, my second patch only works for utf-8 charset which can't be assumed. But the first patch will work always as long as XLockupString() and pam or /etc/shadow use the same charset and the charset has not more than four bytes per char (As far as I know no such charset is in use). The first patch won't break any existing functionality.

If this problem isn't going to be solved, I think I should file a bug to use gnome-screensaver as default since a password dialog that doesn't support all common characters is simply broken.

--------------------------

LC_ALL=de_DE.iso885915 xev

KeyPress event, serial 34, synthetic NO, window 0x3e00001,
    root 0xb0, subw 0x0, time 233087494, (426,266), root:(856,597),
    state 0x90, keycode 26 (keysym 0x20ac, EuroSign), same_screen YES,
    XLookupString gives 1 bytes: (a4) "�"
    XmbLookupString gives 1 bytes: (a4) "�"
    XFilterEvent returns: False

LC_ALL=de_DE.utf8 xev

KeyPress event, serial 34, synthetic NO, window 0x4200001,
    root 0xb0, subw 0x0, time 233163518, (88,257), root:(518,588),
    state 0x90, keycode 26 (keysym 0x20ac, EuroSign), same_screen YES,
    XLookupString gives 3 bytes: (e2 82 ac) "€"
    XmbLookupString gives 3 bytes: (e2 82 ac) "€"
    XFilterEvent returns: False

LC_ALL=ru_RU.koi8r xev

KeyPress event, serial 34, synthetic NO, window 0x4200001,
    root 0xb0, subw 0x0, time 233219414, (-27,405), root:(403,736),
    state 0x90, keycode 26 (keysym 0x20ac, EuroSign), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False