diff libpurple/util.c @ 20423:85d131a53fa2

merge of 'b0a7fb13dafc5da577103e3aac205667caf2e6f2' and 'f8c1a2570c084da24766533cd1f4a971eb2e6560'
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 26 May 2007 12:49:57 +0000
parents d8102e923bd1
children ba768014f91f 1b74553c5c08 3d035cdd103b ddd3c6e238fe
line wrap: on
line diff
--- a/libpurple/util.c	Sat May 26 12:49:49 2007 +0000
+++ b/libpurple/util.c	Sat May 26 12:49:57 2007 +0000
@@ -3159,10 +3159,13 @@
 					keyend = tmp;
 
 				if (keyend && keyend != pairstart) {
+					char *p;
 					key = g_strndup(pairstart, (keyend - pairstart));
 					/* If there is an explicit value */
 					if (keyend != tmp && keyend != (tmp - 1))
 						value = g_strndup(keyend + 1, (tmp - keyend - 1));
+					for (p = key; *p; ++p)
+						*p = g_ascii_tolower(*p);
 					g_hash_table_insert(params, key, value);
 				}
 				keyend = value = NULL;
@@ -4212,7 +4215,7 @@
 		gunichar c = g_utf8_get_char(iter);
 		/* If the character is an ASCII character and is alphanumeric,
 		 * or one of the specified values, no need to escape */
-		if (c < 128 && (isalnum(c) || c == '@' || c == '-' ||
+		if (c < 128 && (g_ascii_isalnum(c) || c == '@' || c == '-' ||
 				c == '_' || c == '.' || c == '#')) {
 			buf[j++] = c;
 		} else {