# HG changeset patch # User Elliott Sales de Andrade # Date 1250392978 0 # Node ID 3b6f50b68f5d2ddc81b88dd7be31bd487fd7ae2d # Parent 027f342110b65bb1a9799080759dbbf3f90d6228 Make gnt_keys_refine UTF8-compatible. Note, the rest of the tests don't need to be changed as multi-byte UTF8 values are always >128. Fixes #2504. diff -r 027f342110b6 -r 3b6f50b68f5d ChangeLog --- a/ChangeLog Sat Aug 15 19:59:14 2009 +0000 +++ b/ChangeLog Sun Aug 16 03:22:58 2009 +0000 @@ -192,6 +192,8 @@ * The hardware cursor is updated correctly. This will be useful especially for users of braille terminals, screen readers etc. * Added a TinyURL plugin, which aids copying longer URLs. + * Fixed UTF-8 compatibility problems which could cause exits or other + unrequested behaviour. Pidgin GTK+ Theme Control Plugin: * Removed mouse cursor color preferences. diff -r 027f342110b6 -r 3b6f50b68f5d finch/libgnt/gntkeys.c --- a/finch/libgnt/gntkeys.c Sat Aug 15 19:59:14 2009 +0000 +++ b/finch/libgnt/gntkeys.c Sun Aug 16 03:22:58 2009 +0000 @@ -166,7 +166,7 @@ strstr(term, "xterm") == term || strstr(term, "vt100") == term) *(text + 1) = 'O'; - } else if (*(unsigned char*)text == 195) { + } else if (g_utf8_get_char(text) == 195) { if (*(text + 2) == 0 && strstr(term, "xterm") == term) { *(text) = 27; *(text + 1) -= 64; /* Say wha? */