# HG changeset patch # User Sadrul Habib Chowdhury # Date 1191420871 0 # Node ID b9d6cd4d9024e006272462cb798cb0b9366c3274 # Parent 4c7604b4841c0f31785b5546aafdc96bf9e869fc Convert the inputs to UTF8 first before doing anything. Thanks a lot to Ionic` on #pidgin for testing. diff -r 4c7604b4841c -r b9d6cd4d9024 finch/libgnt/gntmain.c --- a/finch/libgnt/gntmain.c Wed Oct 03 07:19:31 2007 +0000 +++ b/finch/libgnt/gntmain.c Wed Oct 03 14:14:31 2007 +0000 @@ -223,6 +223,7 @@ char keys[256]; int rd; char *k; + char *cvrt = NULL; if (wm->mode == GNT_KP_MODE_WAIT_ON_CHILD) return FALSE; @@ -243,15 +244,16 @@ raise(SIGABRT); } - gnt_wm_set_event_stack(wm, TRUE); rd += HOLDING_ESCAPE; - keys[rd] = 0; - if (mouse_enabled && detect_mouse_action(keys)) - goto end; - if (HOLDING_ESCAPE) keys[0] = '\033'; - k = keys; + keys[rd] = 0; + gnt_wm_set_event_stack(wm, TRUE); + + cvrt = g_locale_to_utf8(keys, rd, (gsize*)&rd, NULL, NULL); + k = cvrt ? cvrt : keys; + if (mouse_enabled && detect_mouse_action(k)) + goto end; #if 0 /* I am not sure what's happening here. If this actually does something, @@ -290,6 +292,7 @@ } end: gnt_wm_set_event_stack(wm, FALSE); + g_free(cvrt); return TRUE; }