pidgin: 21745356: Make gnt_keys_refine UTF8-compatible. No...

qulogic at pidgin.im qulogic at pidgin.im
Sat Aug 15 23:30:31 EDT 2009


-----------------------------------------------------------------
Revision: 21745356545795bcec9c44cff0e779429c5092c6
Ancestor: e908345ac1772ff13e4f847653151463ee52c50d
Author: qulogic at pidgin.im
Date: 2009-08-16T03:22:58
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/21745356545795bcec9c44cff0e779429c5092c6

Modified files:
        ChangeLog finch/libgnt/gntkeys.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- ChangeLog	e01673383246964b98d6048e299a31a1c8557a3e
+++ ChangeLog	fae269dea5ccc9d5fed44724d41dc3b54a248c85
@@ -192,6 +192,8 @@ version 2.6.0 (??/??/2009):
 	* 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.
============================================================
--- finch/libgnt/gntkeys.c	75afa0b358718e7700fee5c9f3b4717bca42a038
+++ finch/libgnt/gntkeys.c	1780358f13f969d63933b0e87f33200a3597cf88
@@ -166,7 +166,7 @@ void gnt_keys_refine(char *text)
 				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? */


More information about the Commits mailing list