=== modified file 'conf.c'
--- conf.c	2011-12-19 17:23:28 +0000
+++ conf.c	2012-07-06 20:36:14 +0000
@@ -197,82 +197,82 @@
 	if( ini == NULL ) return -1;
 	while( ini_read( ini ) )
 	{
-		if( g_strcasecmp( ini->section, "settings" ) == 0 )
+		if( g_ascii_strcasecmp( ini->section, "settings" ) == 0 )
 		{
-			if( g_strcasecmp( ini->key, "runmode" ) == 0 )
+			if( g_ascii_strcasecmp( ini->key, "runmode" ) == 0 )
 			{
-				if( g_strcasecmp( ini->value, "daemon" ) == 0 )
+				if( g_ascii_strcasecmp( ini->value, "daemon" ) == 0 )
 					conf->runmode = RUNMODE_DAEMON;
-				else if( g_strcasecmp( ini->value, "forkdaemon" ) == 0 )
+				else if( g_ascii_strcasecmp( ini->value, "forkdaemon" ) == 0 )
 					conf->runmode = RUNMODE_FORKDAEMON;
 				else
 					conf->runmode = RUNMODE_INETD;
 			}
-			else if( g_strcasecmp( ini->key, "pidfile" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "pidfile" ) == 0 )
 			{
 				g_free( conf->pidfile );
 				conf->pidfile = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "daemoninterface" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "daemoninterface" ) == 0 )
 			{
 				g_free( conf->iface_in );
 				conf->iface_in = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "daemonport" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "daemonport" ) == 0 )
 			{
 				g_free( conf->port );
 				conf->port = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "clientinterface" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "clientinterface" ) == 0 )
 			{
 				g_free( conf->iface_out );
 				conf->iface_out = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "authmode" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "authmode" ) == 0 )
 			{
-				if( g_strcasecmp( ini->value, "registered" ) == 0 )
+				if( g_ascii_strcasecmp( ini->value, "registered" ) == 0 )
 					conf->authmode = AUTHMODE_REGISTERED;
-				else if( g_strcasecmp( ini->value, "closed" ) == 0 )
+				else if( g_ascii_strcasecmp( ini->value, "closed" ) == 0 )
 					conf->authmode = AUTHMODE_CLOSED;
 				else
 					conf->authmode = AUTHMODE_OPEN;
 			}
-			else if( g_strcasecmp( ini->key, "authpassword" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "authpassword" ) == 0 )
 			{
 				g_free( conf->auth_pass );
 				conf->auth_pass = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "operpassword" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "operpassword" ) == 0 )
 			{
 				g_free( conf->oper_pass );
 				conf->oper_pass = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "hostname" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "hostname" ) == 0 )
 			{
 				g_free( conf->hostname );
 				conf->hostname = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "configdir" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "configdir" ) == 0 )
 			{
 				g_free( conf->configdir );
 				conf->configdir = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "motdfile" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "motdfile" ) == 0 )
 			{
 				g_free( conf->motdfile );
 				conf->motdfile = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "account_storage" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "account_storage" ) == 0 )
 			{
 				g_free( conf->primary_storage );
 				conf->primary_storage = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "account_storage_migrate" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "account_storage_migrate" ) == 0 )
 			{
 				g_strfreev( conf->migrate_storage );
 				conf->migrate_storage = g_strsplit_set( ini->value, " \t,;", -1 );
 			}
-			else if( g_strcasecmp( ini->key, "pinginterval" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "pinginterval" ) == 0 )
 			{
 				if( sscanf( ini->value, "%d", &i ) != 1 )
 				{
@@ -281,7 +281,7 @@
 				}
 				conf->ping_interval = i;
 			}
-			else if( g_strcasecmp( ini->key, "pingtimeout" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "pingtimeout" ) == 0 )
 			{
 				if( sscanf( ini->value, "%d", &i ) != 1 )
 				{
@@ -290,7 +290,7 @@
 				}
 				conf->ping_timeout = i;
 			}
-			else if( g_strcasecmp( ini->key, "proxy" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "proxy" ) == 0 )
 			{
 				url_t *url = g_new0( url_t, 1 );
 				
@@ -314,12 +314,12 @@
 				
 				g_free( url );
 			}
-			else if( g_strcasecmp( ini->key, "user" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "user" ) == 0 )
 			{
 				g_free( conf->user );
 				conf->user = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "ft_max_size" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "ft_max_size" ) == 0 )
 			{
 				size_t ft_max_size;
 				if( sscanf( ini->value, "%zu", &ft_max_size ) != 1 )
@@ -329,7 +329,7 @@
 				}
 				conf->ft_max_size = ft_max_size;
 			}
-			else if( g_strcasecmp( ini->key, "ft_max_kbps" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "ft_max_kbps" ) == 0 )
 			{
 				if( sscanf( ini->value, "%d", &i ) != 1 )
 				{
@@ -338,17 +338,17 @@
 				}
 				conf->ft_max_kbps = i;
 			}
-			else if( g_strcasecmp( ini->key, "ft_listen" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "ft_listen" ) == 0 )
 			{
 				g_free( conf->ft_listen );
 				conf->ft_listen = g_strdup( ini->value );
 			}
-			else if( g_strcasecmp( ini->key, "protocols" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "protocols" ) == 0 )
 			{
 				g_strfreev( conf->protocols );
 				conf->protocols = g_strsplit_set( ini->value, " \t,;", -1 );
 			}
-			else if( g_strcasecmp( ini->key, "cafile" ) == 0 )
+			else if( g_ascii_strcasecmp( ini->key, "cafile" ) == 0 )
 			{
 				g_free( conf->cafile );
 				conf->cafile = g_strdup( ini->value );
@@ -360,7 +360,7 @@
 				/* For now just ignore unknown keys... */
 			}
 		}
-		else if( g_strcasecmp( ini->section, "defaults" ) != 0 )
+		else if( g_ascii_strcasecmp( ini->section, "defaults" ) != 0 )
 		{
 			fprintf( stderr, "Error: Unknown section [%s] in configuration file (line %d). "
 			                 "BitlBee configuration must be put in a [settings] section!\n", ini->section, ini->line );
@@ -380,7 +380,7 @@
 	if( ini == NULL ) return;
 	while( ini_read( ini ) )
 	{
-		if( g_strcasecmp( ini->section, "defaults" ) == 0 )
+		if( g_ascii_strcasecmp( ini->section, "defaults" ) == 0 )
 		{
 			set_t *s = set_find( &irc->b->set, ini->key );
 			

=== modified file 'help.c'
--- help.c	2010-09-06 00:20:01 +0000
+++ help.c	2012-07-06 20:36:14 +0000
@@ -134,7 +134,7 @@
 
 	for( h = *help; h; h = h->next )
 	{
-		if( h->title != NULL && g_strcasecmp( h->title, title ) == 0 )
+		if( h->title != NULL && g_ascii_strcasecmp( h->title, title ) == 0 )
 			break;
 	}
 	if( h && h->length > 0 )
@@ -177,7 +177,7 @@
 	
 	for( h = *help; h; h = h->next )
 	{
-		if( g_strcasecmp( h->title, title ) == 0 )
+		if( g_ascii_strcasecmp( h->title, title ) == 0 )
 			return 0;
 		
 		l = h;

=== modified file 'ipc.c'
--- ipc.c	2012-05-02 07:58:22 +0000
+++ ipc.c	2012-07-06 20:36:14 +0000
@@ -61,7 +61,7 @@
 	}
 	
 	/* CLIENT == On initial connects, HELLO is after /RESTARTs. */
-	if( g_strcasecmp( cmd[0], "CLIENT" ) == 0 )
+	if( g_ascii_strcasecmp( cmd[0], "CLIENT" ) == 0 )
 		ipc_to_children_str( "OPERMSG :Client connecting (PID=%d): %s@%s (%s)\r\n",
 		                     (int) ( child ? child->pid : -1 ), cmd[2], cmd[1], cmd[3] );
 }
@@ -522,7 +522,7 @@
 		return;
 	
 	for( i = 0; commands[i].command; i ++ )
-		if( g_strcasecmp( commands[i].command, cmd[0] ) == 0 )
+		if( g_ascii_strcasecmp( commands[i].command, cmd[0] ) == 0 )
 		{
 			/* There is no typo in this line: */
 			for( j = 1; cmd[j]; j ++ ); j --;

=== modified file 'irc.c'
--- irc.c	2012-02-26 09:20:30 +0000
+++ irc.c	2012-07-06 20:36:14 +0000
@@ -894,7 +894,7 @@
 	gsize test_bytes = 0;
 	GIConv ic, oc;
 
-	if( g_strcasecmp( value, "none" ) == 0 )
+	if( g_ascii_strcasecmp( value, "none" ) == 0 )
 		value = g_strdup( "utf-8" );
 
 	if( ( oc = g_iconv_open( value, "utf-8" ) ) == (GIConv) -1 )

=== modified file 'irc_channel.c'
--- irc_channel.c	2012-02-17 10:20:28 +0000
+++ irc_channel.c	2012-07-06 20:36:14 +0000
@@ -587,7 +587,7 @@
 		else
 			ic->last_target = iu;
 	}
-	else if( g_strcasecmp( set_getstr( &irc->b->set, "default_target" ), "last" ) == 0 &&
+	else if( g_ascii_strcasecmp( set_getstr( &irc->b->set, "default_target" ), "last" ) == 0 &&
 	         ic->last_target && g_slist_find( irc->users, ic->last_target ) )
 		iu = ic->last_target;
 	else

=== modified file 'irc_commands.c'
--- irc_commands.c	2012-05-02 07:58:22 +0000
+++ irc_commands.c	2012-07-06 20:36:14 +0000
@@ -335,7 +335,7 @@
 	}
 	
 	/* Don't treat CTCP actions as real CTCPs, just convert them right now. */
-	if( g_strncasecmp( cmd[2], "\001ACTION", 7 ) == 0 )
+	if( g_ascii_strncasecmp( cmd[2], "\001ACTION", 7 ) == 0 )
 	{
 		cmd[2] += 4;
 		memcpy( cmd[2], "/me", 3 );
@@ -762,7 +762,7 @@
 		return;
 	
 	for( i = 0; irc_commands[i].command; i++ )
-		if( g_strcasecmp( irc_commands[i].command, cmd[0] ) == 0 )
+		if( g_ascii_strcasecmp( irc_commands[i].command, cmd[0] ) == 0 )
 		{
 			/* There should be no typo in the next line: */
 			for( n_arg = 0; cmd[n_arg]; n_arg ++ ); n_arg --;

=== modified file 'irc_im.c'
--- irc_im.c	2012-03-10 00:06:29 +0000
+++ irc_im.c	2012-07-06 20:36:14 +0000
@@ -237,7 +237,7 @@
 		}
 	}
 	
-	if( ( g_strcasecmp( set_getstr( &bee->set, "strip_html" ), "always" ) == 0 ) ||
+	if( ( g_ascii_strcasecmp( set_getstr( &bee->set, "strip_html" ), "always" ) == 0 ) ||
 	    ( ( bu->ic->flags & OPT_DOES_HTML ) && set_getbool( &bee->set, "strip_html" ) ) )
 	{
 		char *s = g_strdup( msg );
@@ -479,8 +479,8 @@
 
 static gboolean bee_irc_user_ctcp( irc_user_t *iu, char *const *ctcp )
 {
-	if( ctcp[1] && g_strcasecmp( ctcp[0], "DCC" ) == 0
-	            && g_strcasecmp( ctcp[1], "SEND" ) == 0 )
+	if( ctcp[1] && g_ascii_strcasecmp( ctcp[0], "DCC" ) == 0
+	            && g_ascii_strcasecmp( ctcp[1], "SEND" ) == 0 )
 	{
 		if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->transfer_request )
 		{
@@ -491,7 +491,7 @@
 			return TRUE;
 		}
 	}
-	else if( g_strcasecmp( ctcp[0], "TYPING" ) == 0 )
+	else if( g_ascii_strcasecmp( ctcp[0], "TYPING" ) == 0 )
 	{
 		if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->send_typing && ctcp[1] )
 		{
@@ -505,7 +505,7 @@
 			return TRUE;
 		}
 	}
-	else if( g_strcasecmp( ctcp[0], "HELP" ) == 0 && iu->bu )
+	else if( g_ascii_strcasecmp( ctcp[0], "HELP" ) == 0 && iu->bu )
 	{
 		GString *supp = g_string_new( "Supported CTCPs:" );
 		GList *l;

=== modified file 'irc_send.c'
--- irc_send.c	2012-05-02 07:58:22 +0000
+++ irc_send.c	2012-07-06 20:36:14 +0000
@@ -338,8 +338,8 @@
 		}
 		if( *s == 0 || *s == '\n' )
 		{
-			if( g_strncasecmp( line, "/me ", 4 ) == 0 && ( !prefix || !*prefix ) &&
-			    g_strcasecmp( type, "PRIVMSG" ) == 0 )
+			if( g_ascii_strncasecmp( line, "/me ", 4 ) == 0 && ( !prefix || !*prefix ) &&
+			    g_ascii_strcasecmp( type, "PRIVMSG" ) == 0 )
 			{
 				strcpy( raw_msg, "\001ACTION " );
 				strncat( raw_msg, line + 4, s - line - 4 );

=== modified file 'irc_user.c'
--- irc_user.c	2012-05-02 07:58:22 +0000
+++ irc_user.c	2012-07-06 20:36:14 +0000
@@ -229,12 +229,12 @@
 
 static gboolean root_ctcp( irc_user_t *iu, char * const *ctcp )
 {
-	if( g_strcasecmp( ctcp[0], "VERSION" ) == 0 )
+	if( g_ascii_strcasecmp( ctcp[0], "VERSION" ) == 0 )
 	{
 		irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001",
 		                ctcp[0], PACKAGE " " BITLBEE_VERSION " " ARCH "/" CPU );
 	}
-	else if( g_strcasecmp( ctcp[0], "PING" ) == 0 )
+	else if( g_ascii_strcasecmp( ctcp[0], "PING" ) == 0 )
 	{
 		irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001%s %s\001",
 		                ctcp[0], ctcp[1] ? : "" );

=== modified file 'lib/misc.c'
--- lib/misc.c	2011-12-20 16:42:17 +0000
+++ lib/misc.c	2012-07-06 20:36:14 +0000
@@ -176,15 +176,15 @@
 			taglen = in - cs - 1;   /* not <0 because the above loop runs at least once */
 			if( *in )
 			{
-				if( g_strncasecmp( cs+1, "b", taglen) == 0 )
-					*(s++) = '\x02';
-				else if( g_strncasecmp( cs+1, "/b", taglen) == 0 )
-					*(s++) = '\x02';
-				else if( g_strncasecmp( cs+1, "i", taglen) == 0 )
-					*(s++) = '\x1f';
-				else if( g_strncasecmp( cs+1, "/i", taglen) == 0 )
-					*(s++) = '\x1f';
-				else if( g_strncasecmp( cs+1, "br", taglen) == 0 )
+				if( g_ascii_strncasecmp( cs+1, "b", taglen) == 0 )
+					*(s++) = '\x02';
+				else if( g_ascii_strncasecmp( cs+1, "/b", taglen) == 0 )
+					*(s++) = '\x02';
+				else if( g_ascii_strncasecmp( cs+1, "i", taglen) == 0 )
+					*(s++) = '\x1f';
+				else if( g_ascii_strncasecmp( cs+1, "/i", taglen) == 0 )
+					*(s++) = '\x1f';
+				else if( g_ascii_strncasecmp( cs+1, "br", taglen) == 0 )
 					*(s++) = '\n';
 				in ++;
 			}
@@ -204,7 +204,7 @@
 			matched = 0;
 			
 			for( i = 0; *ent[i].code; i ++ )
-				if( g_strncasecmp( ent[i].code, cs, strlen( ent[i].code ) ) == 0 )
+				if( g_ascii_strncasecmp( ent[i].code, cs, strlen( ent[i].code ) ) == 0 )
 				{
 					int j;
 					
@@ -366,7 +366,7 @@
 {
 	int i;
 	
-	if( g_strncasecmp( src, "::ffff:", 7 ) != 0 )
+	if( g_ascii_strncasecmp( src, "::ffff:", 7 ) != 0 )
 		return src;
 	
 	for( i = 7; src[i]; i ++ )
@@ -485,9 +485,9 @@
 	if( *value == 0 )
 		return 0;
 	
-	if( ( g_strcasecmp( value, "true" ) == 0 ) || ( g_strcasecmp( value, "yes" ) == 0 ) || ( g_strcasecmp( value, "on" ) == 0 ) )
+	if( ( g_ascii_strcasecmp( value, "true" ) == 0 ) || ( g_ascii_strcasecmp( value, "yes" ) == 0 ) || ( g_ascii_strcasecmp( value, "on" ) == 0 ) )
 		return 1;
-	if( ( g_strcasecmp( value, "false" ) == 0 ) || ( g_strcasecmp( value, "no" ) == 0 ) || ( g_strcasecmp( value, "off" ) == 0 ) )
+	if( ( g_ascii_strcasecmp( value, "false" ) == 0 ) || ( g_ascii_strcasecmp( value, "no" ) == 0 ) || ( g_ascii_strcasecmp( value, "off" ) == 0 ) )
 		return 1;
 	
 	while( *value )
@@ -503,9 +503,9 @@
 {
 	int i;
 	
-	if( ( g_strcasecmp( value, "true" ) == 0 ) || ( g_strcasecmp( value, "yes" ) == 0 ) || ( g_strcasecmp( value, "on" ) == 0 ) )
+	if( ( g_ascii_strcasecmp( value, "true" ) == 0 ) || ( g_ascii_strcasecmp( value, "yes" ) == 0 ) || ( g_ascii_strcasecmp( value, "on" ) == 0 ) )
 		return 1;
-	if( ( g_strcasecmp( value, "false" ) == 0 ) || ( g_strcasecmp( value, "no" ) == 0 ) || ( g_strcasecmp( value, "off" ) == 0 ) )
+	if( ( g_ascii_strcasecmp( value, "false" ) == 0 ) || ( g_ascii_strcasecmp( value, "no" ) == 0 ) || ( g_ascii_strcasecmp( value, "off" ) == 0 ) )
 		return 0;
 	
 	if( sscanf( value, "%d", &i ) == 1 )
@@ -744,7 +744,7 @@
 	while( ( i + hlen ) < len )
 	{
 		/* Maybe this is a bit over-commented, but I just hate this part... */
-		if( g_strncasecmp( text + i, header, hlen ) == 0 )
+		if( g_ascii_strncasecmp( text + i, header, hlen ) == 0 )
 		{
 			/* Skip to the (probable) end of the header */
 			i += hlen;

=== modified file 'lib/url.c'
--- lib/url.c	2010-04-25 18:56:53 +0000
+++ lib/url.c	2012-07-06 20:36:14 +0000
@@ -42,13 +42,13 @@
 	}
 	else
 	{
-		if( g_strncasecmp( set_url, "http", i - set_url ) == 0 )
+		if( g_ascii_strncasecmp( set_url, "http", i - set_url ) == 0 )
 			url->proto = PROTO_HTTP;
-		else if( g_strncasecmp( set_url, "https", i - set_url ) == 0 )
+		else if( g_ascii_strncasecmp( set_url, "https", i - set_url ) == 0 )
 			url->proto = PROTO_HTTPS;
-		else if( g_strncasecmp( set_url, "socks4", i - set_url ) == 0 )
+		else if( g_ascii_strncasecmp( set_url, "socks4", i - set_url ) == 0 )
 			url->proto = PROTO_SOCKS4;
-		else if( g_strncasecmp( set_url, "socks5", i - set_url ) == 0 )
+		else if( g_ascii_strncasecmp( set_url, "socks5", i - set_url ) == 0 )
 			url->proto = PROTO_SOCKS5;
 		else
 			return 0;

=== modified file 'lib/xmltree.c'
--- lib/xmltree.c	2012-06-03 23:08:43 +0000
+++ lib/xmltree.c	2012-07-06 20:36:14 +0000
@@ -29,8 +29,8 @@
 
 #include "xmltree.h"
 
-#define g_strcasecmp g_ascii_strcasecmp
-#define g_strncasecmp g_ascii_strncasecmp
+#define g_ascii_strcasecmp g_ascii_strcasecmp
+#define g_ascii_strncasecmp g_ascii_strncasecmp
 
 static void xt_start_element( GMarkupParseContext *ctx, const gchar *element_name, const gchar **attr_names, const gchar **attr_values, gpointer data, GError **error )
 {
@@ -183,11 +183,11 @@
 			    /* If handler.name == NULL it means it should always match. */
 			if( ( xt->handlers[i].name == NULL || 
 			      /* If it's not, compare. There should always be a name. */
-			      g_strcasecmp( xt->handlers[i].name, node->name ) == 0 ) &&
+			      g_ascii_strcasecmp( xt->handlers[i].name, node->name ) == 0 ) &&
 			    /* If handler.parent == NULL, it's a match. */
 			    ( xt->handlers[i].parent == NULL ||
 			      /* If there's a parent node, see if the name matches. */
-			      ( node->parent ? g_strcasecmp( xt->handlers[i].parent, node->parent->name ) == 0 : 
+			      ( node->parent ? g_ascii_strcasecmp( xt->handlers[i].parent, node->parent->name ) == 0 : 
 			      /* If there's no parent, the handler should mention <root> as a parent. */
 			                       strcmp( xt->handlers[i].parent, "<root>" ) == 0 ) ) )
 			{
@@ -476,9 +476,9 @@
 	{
 		char *colon;
 		
-		if( g_strcasecmp( node->name, name ) == 0 ||
+		if( g_ascii_strcasecmp( node->name, name ) == 0 ||
 		    ( ( colon = strchr( node->name, ':' ) ) &&
-		      g_strcasecmp( colon + 1, name ) == 0 ) )
+		      g_ascii_strcasecmp( colon + 1, name ) == 0 ) )
 			break;
 		
 		node = node->next;
@@ -512,9 +512,9 @@
 			
 			while( node )
 			{
-				if( g_strncasecmp( node->name, name, n ) == 0 ||
+				if( g_ascii_strncasecmp( node->name, name, n ) == 0 ||
 				    ( ( colon = strchr( node->name, ':' ) ) &&
-				      g_strncasecmp( colon + 1, name, n ) == 0 ) )
+				      g_ascii_strncasecmp( colon + 1, name, n ) == 0 ) )
 					break;
 				
 				node = node->next;
@@ -536,7 +536,7 @@
 		return NULL;
 	
 	for( i = 0; node->attr[i].key; i ++ )
-		if( g_strcasecmp( node->attr[i].key, key ) == 0 )
+		if( g_ascii_strcasecmp( node->attr[i].key, key ) == 0 )
 			break;
 	
 	/* This is an awful hack that only takes care of namespace prefixes

=== modified file 'nick.c'
--- nick.c	2011-10-03 14:56:58 +0000
+++ nick.c	2012-07-06 20:36:14 +0000
@@ -143,28 +143,28 @@
 				while( isdigit( *fmt ) )
 					len = len * 10 + ( *(fmt++) - '0' );
 			}
-			else if( g_strncasecmp( fmt, "nick", 4 ) == 0 )
+			else if( g_ascii_strncasecmp( fmt, "nick", 4 ) == 0 )
 			{
 				part = bu->nick ? : bu->handle;
 				fmt += 4;
 				ok |= TRUE;
 				break;
 			}
-			else if( g_strncasecmp( fmt, "handle", 6 ) == 0 )
+			else if( g_ascii_strncasecmp( fmt, "handle", 6 ) == 0 )
 			{
 				part = bu->handle;
 				fmt += 6;
 				ok |= TRUE;
 				break;
 			}
-			else if( g_strncasecmp( fmt, "full_name", 9 ) == 0 )
+			else if( g_ascii_strncasecmp( fmt, "full_name", 9 ) == 0 )
 			{
 				part = bu->fullname;
 				fmt += 9;
 				ok |= part && *part;
 				break;
 			}
-			else if( g_strncasecmp( fmt, "first_name", 10 ) == 0 )
+			else if( g_ascii_strncasecmp( fmt, "first_name", 10 ) == 0 )
 			{
 				part = bu->fullname;
 				fmt += 10;
@@ -172,13 +172,13 @@
 				chop = ' ';
 				break;
 			}
-			else if( g_strncasecmp( fmt, "group", 5 ) == 0 )
+			else if( g_ascii_strncasecmp( fmt, "group", 5 ) == 0 )
 			{
 				part = bu->group ? bu->group->name : NULL;
 				fmt += 5;
 				break;
 			}
-			else if( g_strncasecmp( fmt, "account", 7 ) == 0 )
+			else if( g_ascii_strncasecmp( fmt, "account", 7 ) == 0 )
 			{
 				part = bu->ic->acc->tag;
 				fmt += 7;

=== modified file 'otr.c'
--- otr.c	2011-11-26 00:41:45 +0000
+++ otr.c	2012-07-06 20:36:14 +0000
@@ -425,7 +425,7 @@
 					color=5;   /* red */
 
 				/* in a query window, keep "/me " uncolored at the beginning */
-				if(g_strncasecmp(msg, "/me ", 4) == 0
+				if(g_ascii_strncasecmp(msg, "/me ", 4) == 0
 				   && irc_user_msgdest(iu) == irc->user->nick) {
 					msg += 4;  /* skip */
 					pre = "/me ";
@@ -472,7 +472,7 @@
 	/* consider OTR plaintext to be HTML if otr_does_html is set */
 	if(ctx && ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED &&
 	   set_getbool(&ic->bee->set, "otr_does_html") &&
-	   (g_strncasecmp(msg, "<html>", 6) != 0)) {
+	   (g_ascii_strncasecmp(msg, "<html>", 6) != 0)) {
 		emsg = escape_html(msg);
 	}
 	

=== modified file 'protocols/account.c'
--- protocols/account.c	2010-11-21 19:34:59 +0000
+++ protocols/account.c	2012-07-06 20:36:14 +0000
@@ -266,7 +266,7 @@
 	
 	for( a = bee->accounts; a; a = a->next )
 	{
-		if( g_strcasecmp( id, a->prpl->name ) == 0 )
+		if( g_ascii_strcasecmp( id, a->prpl->name ) == 0 )
 		{
 			if( !ret )
 				ret = a;
@@ -290,7 +290,7 @@
 	account_t *a;
 	
 	for( a = bee->accounts; a; a = a->next )
-		if( a->tag && g_strcasecmp( tag, a->tag ) == 0 )
+		if( a->tag && g_ascii_strcasecmp( tag, a->tag ) == 0 )
 			return a;
 	
 	return NULL;

=== modified file 'protocols/bee_chat.c'
--- protocols/bee_chat.c	2010-09-05 23:30:40 +0000
+++ protocols/bee_chat.c	2012-07-06 20:36:14 +0000
@@ -87,13 +87,13 @@
 	char *s;
 	
 	/* Gaim sends own messages through this too. IRC doesn't want this, so kill them */
-	if( g_strcasecmp( who, ic->acc->user ) == 0 )
+	if( g_ascii_strcasecmp( who, ic->acc->user ) == 0 )
 		return;
 	
 	bu = bee_user_by_handle( bee, ic, who );
 	
 	s = set_getstr( &ic->bee->set, "strip_html" );
-	if( ( g_strcasecmp( s, "always" ) == 0 ) ||
+	if( ( g_ascii_strcasecmp( s, "always" ) == 0 ) ||
 	    ( ( ic->flags & OPT_DOES_HTML ) && s ) )
 		strip_html( msg );
 	
@@ -132,12 +132,12 @@
 	
 	if( who == NULL)
 		bu = NULL;
-	else if( g_strcasecmp( who, ic->acc->user ) == 0 )
+	else if( g_ascii_strcasecmp( who, ic->acc->user ) == 0 )
 		bu = bee->user;
 	else
 		bu = bee_user_by_handle( bee, ic, who );
 	
-	if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
+	if( ( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
 	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) )
 		strip_html( topic );
 	
@@ -182,7 +182,7 @@
 		imcb_log( ic, "User %s removed from conversation %p (%s)", handle, c, reason ? reason : "" );
 	
 	/* It might be yourself! */
-	if( g_strcasecmp( handle, ic->acc->user ) == 0 )
+	if( g_ascii_strcasecmp( handle, ic->acc->user ) == 0 )
 	{
 		if( c->joined == 0 )
 			return;
@@ -204,7 +204,7 @@
 	struct im_connection *ic = c->ic;
 	char *buf = NULL;
 	
-	if( ( ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
+	if( ( ic->flags & OPT_DOES_HTML ) && ( g_ascii_strncasecmp( msg, "<html>", 6 ) != 0 ) )
 	{
 		buf = escape_html( msg );
 		msg = buf;

=== modified file 'protocols/bee_user.c'
--- protocols/bee_user.c	2011-02-24 19:47:50 +0000
+++ protocols/bee_user.c	2012-07-06 20:36:14 +0000
@@ -93,7 +93,7 @@
 	char *buf = NULL;
 	int st;
 	
-	if( ( bu->ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
+	if( ( bu->ic->flags & OPT_DOES_HTML ) && ( g_ascii_strncasecmp( msg, "<html>", 6 ) != 0 ) )
 	{
 		buf = escape_html( msg );
 		msg = buf;
@@ -164,13 +164,13 @@
 	
 	if( !( bu = bee_user_by_handle( bee, ic, handle ) ) )
 	{
-		if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 )
+		if( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "add" ) == 0 )
 		{
 			bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );
 		}
 		else
 		{
-			if( g_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "ignore" ) != 0 )
+			if( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "handle_unknown" ), "ignore" ) != 0 )
 			{
 				imcb_log( ic, "imcb_buddy_status() for unknown handle %s:\n"
 				              "flags = %d, state = %s, message = %s", handle, flags,
@@ -254,11 +254,11 @@
 	{
 		char *h = set_getstr( &bee->set, "handle_unknown" );
 		
-		if( g_strcasecmp( h, "ignore" ) == 0 )
+		if( g_ascii_strcasecmp( h, "ignore" ) == 0 )
 		{
 			return;
 		}
-		else if( g_strncasecmp( h, "add", 3 ) == 0 )
+		else if( g_ascii_strncasecmp( h, "add", 3 ) == 0 )
 		{
 			bu = bee_user_new( bee, ic, handle, BEE_USER_LOCAL );
 		}

=== modified file 'protocols/jabber/io.c'
--- protocols/jabber/io.c	2011-12-24 17:49:12 +0000
+++ protocols/jabber/io.c	2012-07-06 20:36:14 +0000
@@ -204,7 +204,7 @@
 		   this by hand. :-( */
 		if( !( jd->flags & JFLAG_STREAM_STARTED ) && jd->xt && jd->xt->root )
 		{
-			if( g_strcasecmp( jd->xt->root->name, "stream:stream" ) == 0 )
+			if( g_ascii_strcasecmp( jd->xt->root->name, "stream:stream" ) == 0 )
 			{
 				jd->flags |= JFLAG_STREAM_STARTED;
 				
@@ -326,7 +326,7 @@
 	struct xt_node *c, *reply;
 	int trytls;
 	
-	trytls = g_strcasecmp( set_getstr( &ic->acc->set, "tls" ), "try" ) == 0;
+	trytls = g_ascii_strcasecmp( set_getstr( &ic->acc->set, "tls" ), "try" ) == 0;
 	c = xt_find_node( node->children, "starttls" );
 	if( c && !jd->ssl )
 	{

=== modified file 'protocols/jabber/jabber.c'
--- protocols/jabber/jabber.c	2012-02-23 12:51:12 +0000
+++ protocols/jabber/jabber.c	2012-07-06 20:36:14 +0000
@@ -333,10 +333,10 @@
 	char *s;
 	int st;
 	
-	if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
+	if( g_ascii_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
 		return jabber_write( ic, message, strlen( message ) );
 	
-	if( g_strcasecmp( who, JABBER_OAUTH_HANDLE ) == 0 &&
+	if( g_ascii_strcasecmp( who, JABBER_OAUTH_HANDLE ) == 0 &&
 	    !( jd->flags & OPT_LOGGED_IN ) && jd->fd == -1 )
 	{
 		if( sasl_oauth2_get_refresh_token( ic, message ) )
@@ -437,7 +437,7 @@
 {
 	struct jabber_data *jd = ic->proto_data;
 	
-	if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
+	if( g_ascii_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
 	{
 		jd->flags |= JFLAG_XMLCONSOLE;
 		imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL );
@@ -452,7 +452,7 @@
 {
 	struct jabber_data *jd = ic->proto_data;
 	
-	if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
+	if( g_ascii_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
 	{
 		jd->flags &= ~JFLAG_XMLCONSOLE;
 		/* Not necessary for now. And for now the code isn't too
@@ -608,7 +608,7 @@
 
 void *jabber_buddy_action( struct bee_user *bu, const char *action, char * const args[], void *data )
 {
-	if( g_strcasecmp( action, "VERSION" ) == 0 )
+	if( g_ascii_strcasecmp( action, "VERSION" ) == 0 )
 	{
 		struct jabber_buddy *bud;
 		
@@ -647,7 +647,7 @@
 	ret->chat_free_settings = jabber_chat_free_settings;
 	ret->keepalive = jabber_keepalive;
 	ret->send_typing = jabber_send_typing;
-	ret->handle_cmp = g_strcasecmp;
+	ret->handle_cmp = g_ascii_strcasecmp;
 	ret->transfer_request = jabber_si_transfer_request;
 	ret->buddy_action_list = jabber_buddy_action_list;
 	ret->buddy_action = jabber_buddy_action;

=== modified file 'protocols/jabber/jabber_util.c'
--- protocols/jabber/jabber_util.c	2011-12-26 18:56:10 +0000
+++ protocols/jabber/jabber_util.c	2012-07-06 20:36:14 +0000
@@ -67,7 +67,7 @@
 
 char *set_eval_tls( set_t *set, char *value )
 {
-	if( g_strcasecmp( value, "try" ) == 0 )
+	if( g_ascii_strcasecmp( value, "try" ) == 0 )
 		return value;
 	else
 		return set_eval_bool( set, value );
@@ -245,7 +245,7 @@
 		return NULL;
 	
 	for( i = 0; jabber_away_state_list[i].full_name; i ++ )
-		if( g_strcasecmp( jabber_away_state_list[i].code, code ) == 0 )
+		if( g_ascii_strcasecmp( jabber_away_state_list[i].code, code ) == 0 )
 			return jabber_away_state_list + i;
 	
 	return NULL;
@@ -259,7 +259,7 @@
 		return NULL;
 	
 	for( i = 0; jabber_away_state_list[i].full_name; i ++ )
-		if( g_strcasecmp( jabber_away_state_list[i].full_name, name ) == 0 )
+		if( g_ascii_strcasecmp( jabber_away_state_list[i].full_name, name ) == 0 )
 			return jabber_away_state_list + i;
 	
 	return NULL;

=== modified file 'protocols/jabber/sasl.c'
--- protocols/jabber/sasl.c	2012-03-10 00:00:25 +0000
+++ protocols/jabber/sasl.c	2012-07-06 20:36:14 +0000
@@ -89,15 +89,15 @@
 	c = node->children;
 	while( ( c = xt_find_node( c, "mechanism" ) ) )
 	{
-		if( c->text && g_strcasecmp( c->text, "PLAIN" ) == 0 )
+		if( c->text && g_ascii_strcasecmp( c->text, "PLAIN" ) == 0 )
 			sup_plain = 1;
-		else if( c->text && g_strcasecmp( c->text, "DIGEST-MD5" ) == 0 )
+		else if( c->text && g_ascii_strcasecmp( c->text, "DIGEST-MD5" ) == 0 )
 			sup_digest = 1;
-		else if( c->text && g_strcasecmp( c->text, "X-OAUTH2" ) == 0 )
+		else if( c->text && g_ascii_strcasecmp( c->text, "X-OAUTH2" ) == 0 )
 			sup_gtalk = 1;
-		else if( c->text && g_strcasecmp( c->text, "X-FACEBOOK-PLATFORM" ) == 0 )
+		else if( c->text && g_ascii_strcasecmp( c->text, "X-FACEBOOK-PLATFORM" ) == 0 )
 			sup_fb = 1;
-		else if( c->text && g_strcasecmp( c->text, "X-MESSENGER-OAUTH2" ) == 0 )
+		else if( c->text && g_ascii_strcasecmp( c->text, "X-MESSENGER-OAUTH2" ) == 0 )
 			sup_ms = 1;
 		
 		if( c->text )
@@ -206,7 +206,7 @@
 	while( isspace( *data ) || *data == ',' )
 		data ++;
 	
-	if( g_strncasecmp( data, field, len ) == 0 && data[len] == '=' )
+	if( g_ascii_strncasecmp( data, field, len ) == 0 && data[len] == '=' )
 	{
 		i = strlen( field ) + 1;
 	}
@@ -229,7 +229,7 @@
 				while( isspace( data[i] ) || data[i] == ',' )
 					i ++;
 				
-				if( g_strncasecmp( data + i, field, len ) == 0 &&
+				if( g_ascii_strncasecmp( data + i, field, len ) == 0 &&
 				    data[i+len] == '=' )
 				{
 					i += len + 1;

=== modified file 'protocols/msn/msn.c'
--- protocols/msn/msn.c	2011-03-08 06:23:34 +0000
+++ protocols/msn/msn.c	2012-07-06 20:36:14 +0000
@@ -372,7 +372,7 @@
 
 void *msn_buddy_action( struct bee_user *bu, const char *action, char * const args[], void *data )
 {
-	if( g_strcasecmp( action, "NUDGE" ) == 0 )
+	if( g_ascii_strcasecmp( action, "NUDGE" ) == 0 )
 		msn_buddy_msg( bu->ic, bu->handle, NUDGE_MESSAGE, 0 );
 	
 	return NULL;
@@ -403,7 +403,7 @@
 	ret->add_deny = msn_add_deny;
 	ret->rem_deny = msn_rem_deny;
 	ret->send_typing = msn_send_typing;
-	ret->handle_cmp = g_strcasecmp;
+	ret->handle_cmp = g_ascii_strcasecmp;
 	ret->buddy_data_add = msn_buddy_data_add;
 	ret->buddy_data_free = msn_buddy_data_free;
 	ret->buddy_action_list = msn_buddy_action_list;

=== modified file 'protocols/msn/msn_util.c'
--- protocols/msn/msn_util.c	2011-12-19 00:00:31 +0000
+++ protocols/msn/msn_util.c	2012-07-06 20:36:14 +0000
@@ -64,7 +64,7 @@
 	{
 		int i;
 		for( i = 0; i < md->groupcount; i ++ )
-			if( g_strcasecmp( md->grouplist[i], group ) == 0 )
+			if( g_ascii_strcasecmp( md->grouplist[i], group ) == 0 )
 			{
 				g_snprintf( groupid, sizeof( groupid ), " %d", i );
 				break;
@@ -79,7 +79,7 @@
 			for( l = md->grpq; l; l = l->next )
 			{
 				ga = l->data;
-				if( g_strcasecmp( ga->group, group ) == 0 )
+				if( g_ascii_strcasecmp( ga->group, group ) == 0 )
 					break;
 			}
 			
@@ -145,7 +145,7 @@
 	{
 		int i;
 		for( i = 0; i < md->groupcount; i ++ )
-			if( g_strcasecmp( md->grouplist[i], group ) == 0 )
+			if( g_ascii_strcasecmp( md->grouplist[i], group ) == 0 )
 			{
 				g_snprintf( groupid, sizeof( groupid ), " %d", i );
 				break;
@@ -501,7 +501,7 @@
 	{
 		struct msn_group *mg = l->data;
 		
-		if( g_strcasecmp( mg->name, name ) == 0 )
+		if( g_ascii_strcasecmp( mg->name, name ) == 0 )
 			return mg;
 	}
 	
@@ -517,7 +517,7 @@
 	{
 		struct msn_group *mg = l->data;
 		
-		if( g_strcasecmp( mg->id, id ) == 0 )
+		if( g_ascii_strcasecmp( mg->id, id ) == 0 )
 			return mg;
 	}
 	

=== modified file 'protocols/msn/ns.c'
--- protocols/msn/ns.c	2012-02-11 13:01:20 +0000
+++ protocols/msn/ns.c	2012-07-06 20:36:14 +0000
@@ -532,7 +532,7 @@
 		{
 			struct msn_groupadd *ga = l->data;
 			next = l->next;
-			if( g_strcasecmp( ga->group, group ) == 0 )
+			if( g_ascii_strcasecmp( ga->group, group ) == 0 )
 			{
 				if( !msn_buddy_list_add( ic, "FL", ga->who, ga->who, group ) )
 					return 0;
@@ -606,14 +606,14 @@
 	
 	if( strcmp( cmd[0], "MSG" ) == 0 )
 	{
-		if( g_strcasecmp( cmd[1], "Hotmail" ) == 0 )
+		if( g_ascii_strcasecmp( cmd[1], "Hotmail" ) == 0 )
 		{
 			char *ct = get_rfc822_header( msg, "Content-Type:", msglen );
 			
 			if( !ct )
 				return( 1 );
 			
-			if( g_strncasecmp( ct, "application/x-msmsgssystemmessage", 33 ) == 0 )
+			if( g_ascii_strncasecmp( ct, "application/x-msmsgssystemmessage", 33 ) == 0 )
 			{
 				char *mtype;
 				char *arg1;
@@ -633,11 +633,11 @@
 				g_free( arg1 );
 				g_free( mtype );
 			}
-			else if( g_strncasecmp( ct, "text/x-msmsgsprofile", 20 ) == 0 )
+			else if( g_ascii_strncasecmp( ct, "text/x-msmsgsprofile", 20 ) == 0 )
 			{
 				/* We don't care about this profile for now... */
 			}
-			else if( g_strncasecmp( ct, "text/x-msmsgsinitialemailnotification", 37 ) == 0 )
+			else if( g_ascii_strncasecmp( ct, "text/x-msmsgsinitialemailnotification", 37 ) == 0 )
 			{
 				if( set_getbool( &ic->acc->set, "mail_notifications" ) )
 				{
@@ -651,7 +651,7 @@
 					g_free( folders );
 				}
 			}
-			else if( g_strncasecmp( ct, "text/x-msmsgsemailnotification", 30 ) == 0 )
+			else if( g_ascii_strncasecmp( ct, "text/x-msmsgsemailnotification", 30 ) == 0 )
 			{
 				if( set_getbool( &ic->acc->set, "mail_notifications" ) )
 				{
@@ -665,7 +665,7 @@
 					g_free( fromname );
 				}
 			}
-			else if( g_strncasecmp( ct, "text/x-msmsgsactivemailnotification", 35 ) == 0 )
+			else if( g_ascii_strncasecmp( ct, "text/x-msmsgsactivemailnotification", 35 ) == 0 )
 			{
 				/* Sorry, but this one really is *USELESS* */
 			}
@@ -797,7 +797,7 @@
 	domain ++;
 	
 	if( ( d = adl->children ) == NULL ||
-	    g_strcasecmp( xt_find_attr( d, "n" ), domain ) != 0 )
+	    g_ascii_strcasecmp( xt_find_attr( d, "n" ), domain ) != 0 )
 	{
 		d = xt_new_node( "d", NULL, NULL );
 		xt_add_attr( d, "n", domain );

=== modified file 'protocols/msn/sb.c'
--- protocols/msn/sb.c	2012-02-11 17:26:41 +0000
+++ protocols/msn/sb.c	2012-07-06 20:36:14 +0000
@@ -506,7 +506,7 @@
 			return( 0 );
 		}
 		
-		if( sb->who && g_strcasecmp( cmd[1], sb->who ) == 0 )
+		if( sb->who && g_ascii_strcasecmp( cmd[1], sb->who ) == 0 )
 		{
 			/* The user we wanted to talk to is finally there, let's send the queued messages then. */
 			struct msn_message *m;
@@ -689,7 +689,7 @@
 		if( !ct )
 			return( 1 );
 		
-		if( g_strncasecmp( ct, "text/plain", 10 ) == 0 )
+		if( g_ascii_strncasecmp( ct, "text/plain", 10 ) == 0 )
 		{
 			g_free( ct );
 			
@@ -711,7 +711,7 @@
 		}
 #if 0
 		// Disable MSN ft support for now.
-		else if( g_strncasecmp( ct, "text/x-msmsgsinvite", 19 ) == 0 )
+		else if( g_ascii_strncasecmp( ct, "text/x-msmsgsinvite", 19 ) == 0 )
 		{
 			char *command = get_rfc822_header( body, "Invitation-Command:", blen );
 			char *cookie = get_rfc822_header( body, "Invitation-Cookie:", blen );
@@ -730,11 +730,11 @@
 			icookie = strtoul( cookie, NULL, 10 );
 			g_free( cookie );
 			
-			if( g_strncasecmp( command, "INVITE", 6 ) == 0 ) {
+			if( g_ascii_strncasecmp( command, "INVITE", 6 ) == 0 ) {
 				msn_invitation_invite( sb, cmd[1], icookie, body, blen );
-			} else if( g_strncasecmp( command, "ACCEPT", 6 ) == 0 ) {
+			} else if( g_ascii_strncasecmp( command, "ACCEPT", 6 ) == 0 ) {
 				msn_invitation_accept( sb, cmd[1], icookie, body, blen );
-			} else if( g_strncasecmp( command, "CANCEL", 6 ) == 0 ) {
+			} else if( g_ascii_strncasecmp( command, "CANCEL", 6 ) == 0 ) {
 				msn_invitation_cancel( sb, cmd[1], icookie, body, blen );
 			} else {
 				imcb_log( ic, "Warning: Received invalid invitation with "
@@ -744,13 +744,13 @@
 			g_free( command );
 		}
 #endif
-		else if( g_strncasecmp( ct, "application/x-msnmsgrp2p", 24 ) == 0 ) 
+		else if( g_ascii_strncasecmp( ct, "application/x-msnmsgrp2p", 24 ) == 0 ) 
 		{
 			/* Not currently implemented. Don't warn about it since
 			   this seems to be used for avatars now. */
 			g_free( ct );
 		}
-		else if( g_strncasecmp( ct, "text/x-msmsgscontrol", 20 ) == 0 )
+		else if( g_ascii_strncasecmp( ct, "text/x-msmsgscontrol", 20 ) == 0 )
 		{
 			char *who = get_rfc822_header( msg, "TypingUser:", msglen );
 			

=== modified file 'protocols/msn/soap.c'
--- protocols/msn/soap.c	2012-02-11 17:26:41 +0000
+++ protocols/msn/soap.c	2012-07-06 20:36:14 +0000
@@ -699,7 +699,7 @@
 	if( ( p = xt_find_path( node, "groupIds/guid" ) ) )
 		group_id = p->text;
 	
-	if( type && g_strcasecmp( type, "me" ) == 0 )
+	if( type && g_ascii_strcasecmp( type, "me" ) == 0 )
 	{
 		set_t *set = set_find( &ic->acc->set, "display_name" );
 		g_free( set->value );

=== modified file 'protocols/msn/tables.c'
--- protocols/msn/tables.c	2010-08-28 12:22:50 +0000
+++ protocols/msn/tables.c	2012-07-06 20:36:14 +0000
@@ -44,7 +44,7 @@
 	int i;
 	
 	for( i = 0; *msn_away_state_list[i].code; i ++ )
-		if( g_strcasecmp( msn_away_state_list[i].code, code ) == 0 )
+		if( g_ascii_strcasecmp( msn_away_state_list[i].code, code ) == 0 )
 			return( msn_away_state_list + i );
 	
 	return NULL;
@@ -55,7 +55,7 @@
 	int i;
 	
 	for( i = 0; *msn_away_state_list[i].code; i ++ )
-		if( g_strcasecmp( msn_away_state_list[i].name, name ) == 0 )
+		if( g_ascii_strcasecmp( msn_away_state_list[i].name, name ) == 0 )
 			return( msn_away_state_list + i );
 	
 	return NULL;

=== modified file 'protocols/nogaim.c'
--- protocols/nogaim.c	2011-12-21 11:41:13 +0000
+++ protocols/nogaim.c	2012-07-06 20:36:14 +0000
@@ -97,7 +97,7 @@
  
 	for (i = 0; global.conf->protocols && global.conf->protocols[i]; i++)
  	{
- 		if (g_strcasecmp(p->name, global.conf->protocols[i]) == 0)
+ 		if (g_ascii_strcasecmp(p->name, global.conf->protocols[i]) == 0)
 			refused = FALSE;
  	}
 
@@ -115,7 +115,7 @@
  	{
  		struct prpl *proto = gl->data;
  		
- 		if( g_strcasecmp( proto->name, name ) == 0 )
+ 		if( g_ascii_strcasecmp( proto->name, name ) == 0 )
 			return proto;
  	}
  	
@@ -203,7 +203,7 @@
 	text = g_strdup_vprintf( format, params );
 	va_end( params );
 
-	if( ( g_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
+	if( ( g_ascii_strcasecmp( set_getstr( &ic->bee->set, "strip_html" ), "always" ) == 0 ) ||
 	    ( ( ic->flags & OPT_DOES_HTML ) && set_getbool( &ic->bee->set, "strip_html" ) ) )
 		strip_html( text );
 	
@@ -534,7 +534,7 @@
 {
 	char *buf = NULL;
 	
-	if( ( c->ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) )
+	if( ( c->ic->flags & OPT_DOES_HTML ) && ( g_ascii_strncasecmp( msg, "<html>", 6 ) != 0 ) )
 	{
 		buf = escape_html( msg );
 		msg = buf;
@@ -594,7 +594,7 @@
 	int i, j;
 	
 	for( m = gcm; m; m = m->next )
-		if( g_strncasecmp( m->data, away, strlen( m->data ) ) == 0 )
+		if( g_ascii_strncasecmp( m->data, away, strlen( m->data ) ) == 0 )
 		{
 			/* At least the Yahoo! module works better if message
 			   contains no data unless it adds something to what
@@ -610,7 +610,7 @@
 		int keep_message;
 		
 		for( j = 0; imc_away_alias_list[i][j]; j ++ )
-			if( g_strncasecmp( away, imc_away_alias_list[i][j], strlen( imc_away_alias_list[i][j] ) ) == 0 )
+			if( g_ascii_strncasecmp( away, imc_away_alias_list[i][j], strlen( imc_away_alias_list[i][j] ) ) == 0 )
 			{
 				keep_message = strlen( away ) != strlen( imc_away_alias_list[i][j] );
 				break;
@@ -623,7 +623,7 @@
 		for( j = 0; imc_away_alias_list[i][j]; j ++ )
 		{
 			for( m = gcm; m; m = m->next )
-				if( g_strcasecmp( imc_away_alias_list[i][j], m->data ) == 0 )
+				if( g_ascii_strcasecmp( imc_away_alias_list[i][j], m->data ) == 0 )
 				{
 					if( !keep_message )
 						*message = NULL;

=== modified file 'protocols/oscar/oscar.c'
--- protocols/oscar/oscar.c	2012-06-03 23:08:43 +0000
+++ protocols/oscar/oscar.c	2012-07-06 20:36:14 +0000
@@ -1841,10 +1841,10 @@
 	if (state == NULL)
 		state = "";
 
-	if (!g_strcasecmp(state, _("Visible"))) {
+	if (!g_ascii_strcasecmp(state, _("Visible"))) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL);
 		return;
-	} else if (!g_strcasecmp(state, _("Invisible"))) {
+	} else if (!g_ascii_strcasecmp(state, _("Invisible"))) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_INVISIBLE);
 		return;
 	} else if (message == NULL) {
@@ -1894,27 +1894,27 @@
 
 	if (state == NULL) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL);
-	} else if (!g_strcasecmp(state, "Away")) {
+	} else if (!g_ascii_strcasecmp(state, "Away")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY);
 		ic->away = g_strdup(msg);
 		od->sess->aim_icq_state = AIM_MTYPE_AUTOAWAY;
-	} else if (!g_strcasecmp(state, "Do Not Disturb")) {
+	} else if (!g_ascii_strcasecmp(state, "Do Not Disturb")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_DND | AIM_ICQ_STATE_BUSY);
 		ic->away = g_strdup(msg);
 		od->sess->aim_icq_state = AIM_MTYPE_AUTODND;
-	} else if (!g_strcasecmp(state, "Not Available")) {
+	} else if (!g_ascii_strcasecmp(state, "Not Available")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY);
 		ic->away = g_strdup(msg);
 		od->sess->aim_icq_state = AIM_MTYPE_AUTONA;
-	} else if (!g_strcasecmp(state, "Occupied")) {
+	} else if (!g_ascii_strcasecmp(state, "Occupied")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_BUSY);
 		ic->away = g_strdup(msg);
 		od->sess->aim_icq_state = AIM_MTYPE_AUTOBUSY;
-	} else if (!g_strcasecmp(state, "Free For Chat")) {
+	} else if (!g_ascii_strcasecmp(state, "Free For Chat")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_CHAT);
 		ic->away = g_strdup(msg);
 		od->sess->aim_icq_state = AIM_MTYPE_AUTOFFC;
-	} else if (!g_strcasecmp(state, "Invisible")) {
+	} else if (!g_ascii_strcasecmp(state, "Invisible")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_INVISIBLE);
 		ic->away = g_strdup(msg);
 	} else {
@@ -2324,13 +2324,13 @@
 
 	if ((encoding == NULL) || encoding[0] == '\0') {
 		/*		gaim_debug_info("oscar", "Empty encoding, assuming UTF-8\n");*/
-	} else if (!g_strcasecmp(encoding, "iso-8859-1")) {
+	} else if (!g_ascii_strcasecmp(encoding, "iso-8859-1")) {
 		do_iconv("iso-8859-1", "UTF-8", text, utf8, textlen, 8192);
-	} else if (!g_strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1")) {
+	} else if (!g_ascii_strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1")) {
 		do_iconv("Windows-1252", "UTF-8", text, utf8, textlen, 8192);
-	} else if (!g_strcasecmp(encoding, "unicode-2-0")) {
+	} else if (!g_ascii_strcasecmp(encoding, "unicode-2-0")) {
 		do_iconv("UCS-2BE", "UTF-8", text, utf8, textlen, 8192);
-	} else if (g_strcasecmp(encoding, "us-ascii") && strcmp(encoding, "utf-8")) {
+	} else if (g_ascii_strcasecmp(encoding, "us-ascii") && strcmp(encoding, "utf-8")) {
 		/*		gaim_debug_warning("oscar", "Unrecognized character encoding \"%s\", "
 		  "attempting to convert to UTF-8 anyway\n", encoding);*/
 		do_iconv(encoding, "UTF-8", text, utf8, textlen, 8192);

=== modified file 'protocols/purple/purple.c'
--- protocols/purple/purple.c	2012-01-30 22:23:45 +0000
+++ protocols/purple/purple.c	2012-07-06 20:36:14 +0000
@@ -368,7 +368,7 @@
 			break;
 
 		if( state_txt != NULL &&
-		    g_strcasecmp( state_txt, purple_status_type_get_name( pst ) ) == 0 )
+		    g_ascii_strcasecmp( state_txt, purple_status_type_get_name( pst ) ) == 0 )
 			break;
 	}
 	
@@ -1303,7 +1303,7 @@
 	funcs.get_info = purple_get_info;
 	funcs.keepalive = purple_keepalive;
 	funcs.send_typing = purple_send_typing;
-	funcs.handle_cmp = g_strcasecmp;
+	funcs.handle_cmp = g_ascii_strcasecmp;
 	/* TODO(wilmer): Set these only for protocols that support them? */
 	funcs.chat_msg = purple_chat_msg;
 	funcs.chat_with = purple_chat_with;
@@ -1336,7 +1336,7 @@
 		
 		/* libpurple doesn't define a protocol called OSCAR, but we
 		   need it to be compatible with normal BitlBee. */
-		if( g_strcasecmp( prot->info->id, "prpl-aim" ) == 0 )
+		if( g_ascii_strcasecmp( prot->info->id, "prpl-aim" ) == 0 )
 		{
 			ret = g_memdup( &funcs, sizeof( funcs ) );
 			ret->name = "oscar";

=== modified file 'protocols/skype/skype.c'
--- protocols/skype/skype.c	2012-04-12 21:27:54 +0000
+++ protocols/skype/skype.c	2012-07-06 20:36:14 +0000
@@ -1272,7 +1272,7 @@
 	int i;
 
 	for (i = 0; skype_away_state_list[i].full_name; i++)
-		if (g_strcasecmp(skype_away_state_list[i].full_name, name) == 0)
+		if (g_ascii_strcasecmp(skype_away_state_list[i].full_name, name) == 0)
 			return skype_away_state_list + i;
 
 	return NULL;
@@ -1563,9 +1563,9 @@
 	args = args;
 	data = data;
 
-	if (!g_strcasecmp(action, "CALL"))
+	if (!g_ascii_strcasecmp(action, "CALL"))
 		skype_call(bu->ic, bu->handle);
-	else if (!g_strcasecmp(action, "HANGUP"))
+	else if (!g_ascii_strcasecmp(action, "HANGUP"))
 		skype_hangup(bu->ic);
 
 	return NULL;
@@ -1591,7 +1591,7 @@
 	ret->chat_leave = skype_chat_leave;
 	ret->chat_invite = skype_chat_invite;
 	ret->chat_with = skype_chat_with;
-	ret->handle_cmp = g_strcasecmp;
+	ret->handle_cmp = g_ascii_strcasecmp;
 	ret->chat_topic = skype_chat_topic;
 #if BITLBEE_VERSION_CODE > BITLBEE_VER(3, 0, 1)
 	ret->buddy_action_list = skype_buddy_action_list;

=== modified file 'protocols/twitter/twitter.c'
--- protocols/twitter/twitter.c	2012-06-03 23:02:14 +0000
+++ protocols/twitter/twitter.c	2012-07-06 20:36:14 +0000
@@ -82,7 +82,7 @@
 
 	if (set_getbool(&ic->acc->set, "oauth") && !td->oauth_info)
 		twitter_oauth_start(ic);
-	else if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") != 0 &&
+	else if (g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") != 0 &&
 		 !(td->flags & TWITTER_HAVE_FRIENDS)) {
 		imcb_log(ic, "Getting contact list");
 		twitter_get_friends_ids(ic, -1);
@@ -189,8 +189,8 @@
 
 static char *set_eval_mode(set_t * set, char *value)
 {
-	if (g_strcasecmp(value, "one") == 0 ||
-	    g_strcasecmp(value, "many") == 0 || g_strcasecmp(value, "chat") == 0)
+	if (g_ascii_strcasecmp(value, "one") == 0 ||
+	    g_ascii_strcasecmp(value, "many") == 0 || g_ascii_strcasecmp(value, "chat") == 0)
 		return value;
 	else
 		return NULL;
@@ -387,8 +387,8 @@
 	struct twitter_data *td = ic->proto_data;
 	int plen = strlen(td->prefix);
 
-	if (g_strncasecmp(who, td->prefix, plen) == 0 && who[plen] == '_' &&
-	    g_strcasecmp(who + plen + 1, ic->acc->user) == 0) {
+	if (g_ascii_strncasecmp(who, td->prefix, plen) == 0 && who[plen] == '_' &&
+	    g_ascii_strcasecmp(who + plen + 1, ic->acc->user) == 0) {
 		if (set_getbool(&ic->acc->set, "oauth") &&
 		    td->oauth_info && td->oauth_info->token == NULL) {
 			char pin[strlen(message) + 1], *s;
@@ -506,7 +506,7 @@
 		return;
 	} else if (!set_getbool(&ic->acc->set, "commands")) {
 		/* Not supporting commands. */
-	} else if (g_strcasecmp(cmd[0], "undo") == 0) {
+	} else if (g_ascii_strcasecmp(cmd[0], "undo") == 0) {
 		guint64 id;
 
 		if (cmd[1] == NULL)
@@ -521,16 +521,16 @@
 
 		g_free(cmds);
 		return;
-	} else if (g_strcasecmp(cmd[0], "follow") == 0 && cmd[1]) {
+	} else if (g_ascii_strcasecmp(cmd[0], "follow") == 0 && cmd[1]) {
 		twitter_add_buddy(ic, cmd[1], NULL);
 		g_free(cmds);
 		return;
-	} else if (g_strcasecmp(cmd[0], "unfollow") == 0 && cmd[1]) {
+	} else if (g_ascii_strcasecmp(cmd[0], "unfollow") == 0 && cmd[1]) {
 		twitter_remove_buddy(ic, cmd[1], NULL);
 		g_free(cmds);
 		return;
-	} else if ((g_strcasecmp(cmd[0], "report") == 0 ||
-	            g_strcasecmp(cmd[0], "spam") == 0) && cmd[1]) {
+	} else if ((g_ascii_strcasecmp(cmd[0], "report") == 0 ||
+	            g_ascii_strcasecmp(cmd[0], "spam") == 0) && cmd[1]) {
 		char * screen_name;
 		guint64 id;
 		screen_name = cmd[1];
@@ -547,7 +547,7 @@
 		twitter_report_spam(ic, screen_name);
 		g_free(cmds);
 		return;
-	} else if (g_strcasecmp(cmd[0], "rt") == 0 && cmd[1]) {
+	} else if (g_ascii_strcasecmp(cmd[0], "rt") == 0 && cmd[1]) {
 		struct twitter_user_data *tud;
 		bee_user_t *bu;
 		guint64 id;
@@ -573,7 +573,7 @@
 
 		g_free(cmds);
 		return;
-	} else if (g_strcasecmp(cmd[0], "reply") == 0 && cmd[1] && cmd[2]) {
+	} else if (g_ascii_strcasecmp(cmd[0], "reply") == 0 && cmd[1] && cmd[2]) {
 		struct twitter_user_data *tud;
 		bee_user_t *bu = NULL;
 		guint64 id = 0;
@@ -605,7 +605,7 @@
 		}
 		message = new = g_strdup_printf("@%s %s", bu->handle, message + (cmd[2] - cmd[0]));
 		in_reply_to = id;
-	} else if (g_strcasecmp(cmd[0], "post") == 0) {
+	} else if (g_ascii_strcasecmp(cmd[0], "post") == 0) {
 		message += 5;
 	}
 
@@ -669,7 +669,7 @@
 	ret->rem_deny = twitter_rem_deny;
 	ret->buddy_data_add = twitter_buddy_data_add;
 	ret->buddy_data_free = twitter_buddy_data_free;
-	ret->handle_cmp = g_strcasecmp;
+	ret->handle_cmp = g_ascii_strcasecmp;
 
 	register_protocol(ret);
 

=== modified file 'protocols/twitter/twitter_lib.c'
--- protocols/twitter/twitter_lib.c	2012-06-03 23:31:01 +0000
+++ protocols/twitter/twitter_lib.c	2012-07-06 20:36:14 +0000
@@ -152,12 +152,12 @@
 		// The buddy is not in the list, add the buddy and set the status to logged in.
 		imcb_add_buddy(ic, name, NULL);
 		imcb_rename_buddy(ic, name, fullname);
-		if (g_strcasecmp(mode, "chat") == 0) {
+		if (g_ascii_strcasecmp(mode, "chat") == 0) {
 			/* Necessary so that nicks always get translated to the
 			   exact Twitter username. */
 			imcb_buddy_nick_hint(ic, name, name);
 			imcb_chat_add_buddy(td->timeline_gc, name);
-		} else if (g_strcasecmp(mode, "many") == 0)
+		} else if (g_ascii_strcasecmp(mode, "many") == 0)
 			imcb_buddy_status(ic, name, OPT_LOGGED_IN, NULL, NULL);
 	}
 }
@@ -233,13 +233,13 @@
 	// The root <statuses> node should hold the list of statuses <status>
 	// Walk over the nodes children.
 	for (child = node->children; child; child = child->next) {
-		if (g_strcasecmp("ids", child->name) == 0) {
+		if (g_ascii_strcasecmp("ids", child->name) == 0) {
 			struct xt_node *idc;
 			for (idc = child->children; idc; idc = idc->next)
-				if (g_strcasecmp(idc->name, "id") == 0)
+				if (g_ascii_strcasecmp(idc->name, "id") == 0)
 					txl->list = g_slist_prepend(txl->list,
 						g_memdup(idc->text, idc->text_len + 1));
-		} else if (g_strcasecmp("next_cursor", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("next_cursor", child->name) == 0) {
 			twitter_xt_next_cursor(child, txl);
 		}
 	}
@@ -284,7 +284,7 @@
 	}
 
 	/* Create the room now that we "logged in". */
-	if (!td->timeline_gc && g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
+	if (!td->timeline_gc && g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
 		twitter_groupchat_init(ic);
 
 	txl = g_new0(struct twitter_xml_list, 1);
@@ -407,9 +407,9 @@
 
 	// Walk over the nodes children.
 	for (child = node->children; child; child = child->next) {
-		if (g_strcasecmp("name", child->name) == 0) {
+		if (g_ascii_strcasecmp("name", child->name) == 0) {
 			txu->name = g_memdup(child->text, child->text_len + 1);
-		} else if (g_strcasecmp("screen_name", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("screen_name", child->name) == 0) {
 			txu->screen_name = g_memdup(child->text, child->text_len + 1);
 		}
 	}
@@ -432,7 +432,7 @@
 	// The root <users> node should hold the list of users <user>
 	// Walk over the nodes children.
 	for (child = node->children; child; child = child->next) {
-		if (g_strcasecmp("user", child->name) == 0) {
+		if (g_ascii_strcasecmp("user", child->name) == 0) {
 			txu = g_new0(struct twitter_xml_user, 1);
 			twitter_xt_get_user(child, txu);
 			// Put the item in the front of the list.
@@ -463,11 +463,11 @@
 
 	// Walk over the nodes children.
 	for (child = node->children; child; child = child->next) {
-		if (g_strcasecmp("text", child->name) == 0) {
+		if (g_ascii_strcasecmp("text", child->name) == 0) {
 			txs->text = g_memdup(child->text, child->text_len + 1);
-		} else if (g_strcasecmp("retweeted_status", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("retweeted_status", child->name) == 0) {
 			rt = child;
-		} else if (g_strcasecmp("created_at", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("created_at", child->name) == 0) {
 			struct tm parsed;
 
 			/* Very sensitive to changes to the formatting of
@@ -475,12 +475,12 @@
 			   is UTC since C time handling functions suck. */
 			if (strptime(child->text, TWITTER_TIME_FORMAT, &parsed) != NULL)
 				txs->created_at = mktime_utc(&parsed);
-		} else if (g_strcasecmp("user", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("user", child->name) == 0) {
 			txs->user = g_new0(struct twitter_xml_user, 1);
 			twitter_xt_get_user(child, txs->user);
-		} else if (g_strcasecmp("id", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("id", child->name) == 0) {
 			txs->id = g_ascii_strtoull(child->text, NULL, 10);
-		} else if (g_strcasecmp("in_reply_to_status_id", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("in_reply_to_status_id", child->name) == 0) {
 			txs->reply_to = g_ascii_strtoull(child->text, NULL, 10);
 		}
 	}
@@ -549,7 +549,7 @@
 	// The root <statuses> node should hold the list of statuses <status>
 	// Walk over the nodes children.
 	for (child = node->children; child; child = child->next) {
-		if (g_strcasecmp("status", child->name) == 0) {
+		if (g_ascii_strcasecmp("status", child->name) == 0) {
 			txs = g_new0(struct twitter_xml_status, 1);
 			twitter_xt_get_status(child, txs);
 			// Put the item in the front of the list.
@@ -564,7 +564,7 @@
 					tud->last_time = txs->created_at;
 				}
 			}
-		} else if (g_strcasecmp("next_cursor", child->name) == 0) {
+		} else if (g_ascii_strcasecmp("next_cursor", child->name) == 0) {
 			twitter_xt_next_cursor(child, txl);
 		}
 	}
@@ -659,7 +659,7 @@
 		msg = twitter_msg_add_id(ic, status, "");
 
 		// Say it!
-		if (g_strcasecmp(td->user, status->user->screen_name) == 0) {
+		if (g_ascii_strcasecmp(td->user, status->user->screen_name) == 0) {
 			imcb_chat_log(gc, "You: %s", msg ? msg : status->text);
 		} else {
 			twitter_add_buddy(ic, status->user->screen_name, status->user->name);
@@ -688,7 +688,7 @@
 	gboolean mode_one;
 	guint64 last_id = 0;
 
-	mode_one = g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") == 0;
+	mode_one = g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "one") == 0;
 
 	if (mode_one) {
 		g_snprintf(from, sizeof(from) - 1, "%s_%s", td->prefix, ic->acc->user);
@@ -789,7 +789,7 @@
 	}
 
 	// See if the user wants to see the messages in a groupchat window or as private messages.
-	if (g_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
+	if (g_ascii_strcasecmp(set_getstr(&ic->acc->set, "mode"), "chat") == 0)
 		twitter_groupchat(ic, output);
 	else
 		twitter_private_message_chat(ic, output);

=== modified file 'protocols/yahoo/yahoo.c'
--- protocols/yahoo/yahoo.c	2010-08-23 23:12:24 +0000
+++ protocols/yahoo/yahoo.c	2012-07-06 20:36:14 +0000
@@ -73,9 +73,9 @@
 	/* This should get rid of the markup noise at the beginning of the string. */
 	while( *in )
 	{
-		if( g_strncasecmp( in, "<font", 5 ) == 0 ||
-		    g_strncasecmp( in, "<fade", 5 ) == 0 ||
-		    g_strncasecmp( in, "<alt", 4 ) == 0 )
+		if( g_ascii_strncasecmp( in, "<font", 5 ) == 0 ||
+		    g_ascii_strncasecmp( in, "<fade", 5 ) == 0 ||
+		    g_ascii_strncasecmp( in, "<alt", 4 ) == 0 )
 		{
 			char *s = strchr( in, '>' );
 			if( !s )
@@ -142,7 +142,7 @@
 	yd->logged_in = FALSE;
 	yd->current_status = YAHOO_STATUS_AVAILABLE;
 	
-	if( ( s = strchr( acc->user, '@' ) ) && g_strcasecmp( s, "@yahoo.com" ) == 0 )
+	if( ( s = strchr( acc->user, '@' ) ) && g_ascii_strcasecmp( s, "@yahoo.com" ) == 0 )
 		imcb_error( ic, "Your Yahoo! username should just be a username. "
 		                "Do not include any @domain part." );
 	
@@ -208,25 +208,25 @@
 	{
 		/* Use these states only if msg doesn't contain additional
 		   info since away messages are only supported with CUSTOM. */
-		if( g_strcasecmp( state, "Be Right Back" ) == 0 )
+		if( g_ascii_strcasecmp( state, "Be Right Back" ) == 0 )
 			yd->current_status = YAHOO_STATUS_BRB;
-		else if( g_strcasecmp( state, "Busy" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Busy" ) == 0 )
 			yd->current_status = YAHOO_STATUS_BUSY;
-		else if( g_strcasecmp( state, "Not At Home" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Not At Home" ) == 0 )
 			yd->current_status = YAHOO_STATUS_NOTATHOME;
-		else if( g_strcasecmp( state, "Not At Desk" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Not At Desk" ) == 0 )
 			yd->current_status = YAHOO_STATUS_NOTATDESK;
-		else if( g_strcasecmp( state, "Not In Office" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Not In Office" ) == 0 )
 			yd->current_status = YAHOO_STATUS_NOTINOFFICE;
-		else if( g_strcasecmp( state, "On Phone" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "On Phone" ) == 0 )
 			yd->current_status = YAHOO_STATUS_ONPHONE;
-		else if( g_strcasecmp( state, "On Vacation" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "On Vacation" ) == 0 )
 			yd->current_status = YAHOO_STATUS_ONVACATION;
-		else if( g_strcasecmp( state, "Out To Lunch" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Out To Lunch" ) == 0 )
 			yd->current_status = YAHOO_STATUS_OUTTOLUNCH;
-		else if( g_strcasecmp( state, "Stepped Out" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Stepped Out" ) == 0 )
 			yd->current_status = YAHOO_STATUS_STEPPEDOUT;
-		else if( g_strcasecmp( state, "Invisible" ) == 0 )
+		else if( g_ascii_strcasecmp( state, "Invisible" ) == 0 )
 			yd->current_status = YAHOO_STATUS_INVISIBLE;
 		else
 			yd->current_status = YAHOO_STATUS_CUSTOM;
@@ -286,8 +286,8 @@
 		{
 			struct byahoo_buddygroups *bg = bgl->data;
 			
-			if( g_strcasecmp( bg->buddy, who ) == 0 &&
-			    g_strcasecmp( bg->group, bu->group->name ) == 0 )
+			if( g_ascii_strcasecmp( bg->buddy, who ) == 0 &&
+			    g_ascii_strcasecmp( bg->group, bu->group->name ) == 0 )
 			{
 				g_free( bg->group );
 				bg->group = g_strdup( group );
@@ -309,7 +309,7 @@
 	{
 		struct byahoo_buddygroups *bg = bgl->data;
 		
-		if( g_strcasecmp( bg->buddy, who ) == 0 )
+		if( g_ascii_strcasecmp( bg->buddy, who ) == 0 )
 			yahoo_remove_buddy( yd->y2_id, who, bg->group );
 	}
 }
@@ -398,7 +398,7 @@
 	ret->chat_leave = byahoo_chat_leave;
 	ret->chat_with = byahoo_chat_with;
 
-	ret->handle_cmp = g_strcasecmp;
+	ret->handle_cmp = g_ascii_strcasecmp;
 	
 	ret->auth_allow = byahoo_auth_allow;
 	ret->auth_deny = byahoo_auth_deny;
@@ -865,7 +865,7 @@
 	char txt[1024];
 	YList *m;
 	
-	if( g_strcasecmp( who, ic->acc->user ) == 0 )
+	if( g_ascii_strcasecmp( who, ic->acc->user ) == 0 )
 		/* WTF, Yahoo! seems to echo these now? */
 		return;
 	
@@ -879,7 +879,7 @@
 	inv->ic = ic;
 	
 	for( m = members; m; m = m->next )
-		if( g_strcasecmp( m->data, ic->acc->user ) != 0 )
+		if( g_ascii_strcasecmp( m->data, ic->acc->user ) != 0 )
 			imcb_chat_add_buddy( inv->c, m->data );
 	
 	g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", room, who, msg );

=== modified file 'query.c'
--- query.c	2011-10-03 14:56:58 +0000
+++ query.c	2012-07-06 20:36:14 +0000
@@ -65,7 +65,7 @@
 		irc->queries = q;
 	}
 	
-	if( g_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "lifo" ) == 0 || irc->queries == q )
+	if( g_ascii_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "lifo" ) == 0 || irc->queries == q )
 		query_display( irc, q );
 	
 	return( q );
@@ -186,7 +186,7 @@
 {
 	query_t *q;
 	
-	if( g_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "fifo" ) == 0 )
+	if( g_ascii_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "fifo" ) == 0 )
 		q = irc->queries;
 	else
 		for( q = irc->queries; q && q->next; q = q->next );

=== modified file 'root_commands.c'
--- root_commands.c	2012-03-19 21:01:50 +0000
+++ root_commands.c	2012-07-06 20:36:14 +0000
@@ -55,10 +55,10 @@
 	
 	len = strlen( cmd[0] );
 	for( i = 0; root_commands[i].command; i++ )
-		if( g_strncasecmp( root_commands[i].command, cmd[0], len ) == 0 )
+		if( g_ascii_strncasecmp( root_commands[i].command, cmd[0], len ) == 0 )
 		{
 			if( root_commands[i+1].command &&
-		            g_strncasecmp( root_commands[i+1].command, cmd[0], len ) == 0 )
+		            g_ascii_strncasecmp( root_commands[i+1].command, cmd[0], len ) == 0 )
 		        	/* Only match on the first letters if the match is unique. */
 		        	break;
 		        
@@ -315,7 +315,7 @@
 	char *set_name = NULL, *value = NULL;
 	gboolean del = FALSE;
 	
-	if( cmd[1] && g_strncasecmp( cmd[1], "-del", 4 ) == 0 )
+	if( cmd[1] && g_ascii_strncasecmp( cmd[1], "-del", 4 ) == 0 )
 	{
 		MIN_ARGS( 2, 0 );
 		set_name = cmd[2];
@@ -405,7 +405,7 @@
 	
 	len = strlen( cmd[1] );
 	
-	if( len >= 1 && g_strncasecmp( cmd[1], "add", len ) == 0 )
+	if( len >= 1 && g_ascii_strncasecmp( cmd[1], "add", len ) == 0 )
 	{
 		struct prpl *prpl;
 		
@@ -470,7 +470,7 @@
 		
 		return;
 	}
-	else if( len >= 1 && g_strncasecmp( cmd[1], "list", len ) == 0 )
+	else if( len >= 1 && g_ascii_strncasecmp( cmd[1], "list", len ) == 0 )
 	{
 		int i = 0;
 		
@@ -502,7 +502,7 @@
 	{
 		/* Try the following two only if cmd[2] == NULL */
 	}
-	else if( len >= 2 && g_strncasecmp( cmd[1], "on", len ) == 0 )
+	else if( len >= 2 && g_ascii_strncasecmp( cmd[1], "on", len ) == 0 )
 	{
 		if ( irc->b->accounts )
 		{
@@ -525,7 +525,7 @@
 		
 		return;
 	}
-	else if( len >= 2 && g_strncasecmp( cmd[1], "off", len ) == 0 )
+	else if( len >= 2 && g_ascii_strncasecmp( cmd[1], "off", len ) == 0 )
 	{
 		irc_rootmsg( irc, "Deactivating all active (re)connections..." );
 		
@@ -546,10 +546,10 @@
 	/* At least right now, don't accept on/off/set/del as account IDs even
 	   if they're a proper match, since people not familiar with the new
 	   syntax yet may get a confusing/nasty surprise. */
-	if( g_strcasecmp( cmd[1], "on" ) == 0 ||
-	    g_strcasecmp( cmd[1], "off" ) == 0 ||
-	    g_strcasecmp( cmd[1], "set" ) == 0 ||
-	    g_strcasecmp( cmd[1], "del" ) == 0 ||
+	if( g_ascii_strcasecmp( cmd[1], "on" ) == 0 ||
+	    g_ascii_strcasecmp( cmd[1], "off" ) == 0 ||
+	    g_ascii_strcasecmp( cmd[1], "set" ) == 0 ||
+	    g_ascii_strcasecmp( cmd[1], "del" ) == 0 ||
 	    ( a = account_get( irc->b, cmd[1] ) ) == NULL )
 	{
 		irc_rootmsg( irc, "Could not find account `%s'. Note that the syntax "
@@ -558,7 +558,7 @@
 		return;
 	}
 	
-	if( len >= 1 && g_strncasecmp( cmd[2], "del", len ) == 0 )
+	if( len >= 1 && g_ascii_strncasecmp( cmd[2], "del", len ) == 0 )
 	{
 		if( a->ic )
 		{
@@ -570,7 +570,7 @@
 			irc_rootmsg( irc, "Account deleted" );
 		}
 	}
-	else if( len >= 2 && g_strncasecmp( cmd[2], "on", len ) == 0 )
+	else if( len >= 2 && g_ascii_strncasecmp( cmd[2], "on", len ) == 0 )
 	{
 		if( a->ic )
 			irc_rootmsg( irc, "Account already online" );
@@ -580,7 +580,7 @@
 		else
 			account_on( irc->b, a );
 	}
-	else if( len >= 2 && g_strncasecmp( cmd[2], "off", len ) == 0 )
+	else if( len >= 2 && g_ascii_strncasecmp( cmd[2], "off", len ) == 0 )
 	{
 		if( a->ic )
 		{
@@ -596,7 +596,7 @@
 			irc_rootmsg( irc, "Account already offline" );
 		}
 	}
-	else if( len >= 1 && g_strncasecmp( cmd[2], "set", len ) == 0 )
+	else if( len >= 1 && g_ascii_strncasecmp( cmd[2], "set", len ) == 0 )
 	{
 		cmd_set_real( irc, cmd + 2, &a->set, cmd_account_set_checkflags );
 	}
@@ -613,7 +613,7 @@
 	
 	len = strlen( cmd[1] );
 	
-	if( len >= 1 && g_strncasecmp( cmd[1], "list", len ) == 0 )
+	if( len >= 1 && g_ascii_strncasecmp( cmd[1], "list", len ) == 0 )
 	{
 		GSList *l;
 		int i = 0;
@@ -642,7 +642,7 @@
 		   syntax (only works when used inside a channel). */
 		if( ( ic = irc->root->last_channel ) &&
 		    ( len = strlen( cmd[1] ) ) &&
-		    g_strncasecmp( cmd[1], "set", len ) == 0 )
+		    g_ascii_strncasecmp( cmd[1], "set", len ) == 0 )
 			cmd_set_real( irc, cmd + 1, &ic->set, NULL );
 		else
 			irc_rootmsg( irc, "Could not find channel `%s'", cmd[1] );
@@ -653,11 +653,11 @@
 	MIN_ARGS( 2 );
 	len = strlen( cmd[2] );
 	
-	if( len >= 1 && g_strncasecmp( cmd[2], "set", len ) == 0 )
+	if( len >= 1 && g_ascii_strncasecmp( cmd[2], "set", len ) == 0 )
 	{
 		cmd_set_real( irc, cmd + 2, &ic->set, NULL );
 	}
-	else if( len >= 1 && g_strncasecmp( cmd[2], "del", len ) == 0 )
+	else if( len >= 1 && g_ascii_strncasecmp( cmd[2], "del", len ) == 0 )
 	{
 		if( !( ic->flags & IRC_CHANNEL_JOINED ) &&
 		    ic != ic->irc->default_channel )
@@ -681,7 +681,7 @@
 	account_t *a;
 	int add_on_server = 1;
 	
-	if( g_strcasecmp( cmd[1], "-tmp" ) == 0 )
+	if( g_ascii_strcasecmp( cmd[1], "-tmp" ) == 0 )
 	{
 		MIN_ARGS( 3 );
 		add_on_server = 0;
@@ -812,7 +812,7 @@
 static void cmd_rename( irc_t *irc, char **cmd )
 {
 	irc_user_t *iu, *old;
-	gboolean del = g_strcasecmp( cmd[1], "-del" ) == 0;
+	gboolean del = g_ascii_strcasecmp( cmd[1], "-del" ) == 0;
 	
 	iu = irc_user_by_name( irc, cmd[del ? 2 : 1] );
 	
@@ -1058,9 +1058,9 @@
 		}
 	}
 	
-	if( g_strcasecmp( cmd[0], "yes" ) == 0 )
+	if( g_ascii_strcasecmp( cmd[0], "yes" ) == 0 )
 		query_answer( irc, q, 1 );
-	else if( g_strcasecmp( cmd[0], "no" ) == 0 )
+	else if( g_ascii_strcasecmp( cmd[0], "no" ) == 0 )
 		query_answer( irc, q, 0 );
 }
 
@@ -1077,13 +1077,13 @@
 	char *format;
 	int n_online = 0, n_away = 0, n_offline = 0;
 	
-	if( cmd[1] && g_strcasecmp( cmd[1], "all" ) == 0 )
+	if( cmd[1] && g_ascii_strcasecmp( cmd[1], "all" ) == 0 )
 		online = offline = away = 1;
-	else if( cmd[1] && g_strcasecmp( cmd[1], "offline" ) == 0 )
+	else if( cmd[1] && g_ascii_strcasecmp( cmd[1], "offline" ) == 0 )
 		offline = 1;
-	else if( cmd[1] && g_strcasecmp( cmd[1], "away" ) == 0 )
+	else if( cmd[1] && g_ascii_strcasecmp( cmd[1], "away" ) == 0 )
 		away = 1;
-	else if( cmd[1] && g_strcasecmp( cmd[1], "online" ) == 0 )
+	else if( cmd[1] && g_ascii_strcasecmp( cmd[1], "online" ) == 0 )
 		online = 1;
 	else
 		online = away = 1;
@@ -1183,7 +1183,7 @@
 {
 	account_t *acc;
 	
-	if( g_strcasecmp( cmd[1], "add" ) == 0 )
+	if( g_ascii_strcasecmp( cmd[1], "add" ) == 0 )
 	{
 		char *channel, *s;
 		struct irc_channel *ic;
@@ -1238,7 +1238,7 @@
 		}
 		g_free( channel );
 	}
-	else if( g_strcasecmp( cmd[1], "with" ) == 0 )
+	else if( g_ascii_strcasecmp( cmd[1], "with" ) == 0 )
 	{
 		irc_user_t *iu;
 		
@@ -1258,9 +1258,9 @@
 			irc_rootmsg( irc, "Can't open a groupchat with %s.", cmd[2] );
 		}
 	}
-	else if( g_strcasecmp( cmd[1], "list" ) == 0 ||
-	         g_strcasecmp( cmd[1], "set" ) == 0 ||
-	         g_strcasecmp( cmd[1], "del" ) == 0 )
+	else if( g_ascii_strcasecmp( cmd[1], "list" ) == 0 ||
+	         g_ascii_strcasecmp( cmd[1], "set" ) == 0 ||
+	         g_ascii_strcasecmp( cmd[1], "del" ) == 0 )
 	{
 		irc_rootmsg( irc, "Warning: The \002chat\002 command was mostly replaced with the \002channel\002 command." );
 		cmd_channel( irc, cmd );
@@ -1277,7 +1277,7 @@
 	int len;
 	
 	len = strlen( cmd[1] );
-	if( g_strncasecmp( cmd[1], "list", len ) == 0 )
+	if( g_ascii_strncasecmp( cmd[1], "list", len ) == 0 )
 	{
 		int n = 0;
 		
@@ -1436,9 +1436,9 @@
 	
 	for( i = 0; root_commands[i].command; i++ )
 	{
-		if( g_strcasecmp( root_commands[i].command, command ) == 0 )
+		if( g_ascii_strcasecmp( root_commands[i].command, command ) == 0 )
 			return FALSE;
-		else if( g_strcasecmp( root_commands[i].command, command ) > 0 )
+		else if( g_ascii_strcasecmp( root_commands[i].command, command ) > 0 )
 			break;
 	}
 	memmove( root_commands + i + 1, root_commands + i,

=== modified file 'set.c'
--- set.c	2011-12-21 11:21:04 +0000
+++ set.c	2012-07-06 20:36:14 +0000
@@ -68,8 +68,8 @@
 	
 	while( s )
 	{
-		if( g_strcasecmp( s->key, key ) == 0 ||
-		    ( s->old_key && g_strcasecmp( s->old_key, key ) == 0 ) )
+		if( g_ascii_strcasecmp( s->key, key ) == 0 ||
+		    ( s->old_key && g_ascii_strcasecmp( s->old_key, key ) == 0 ) )
 			break;
 		s = s->next;
 	}
@@ -172,7 +172,7 @@
 	
 	while( s )
 	{
-		if( g_strcasecmp( s->key, key ) == 0 )
+		if( g_ascii_strcasecmp( s->key, key ) == 0 )
 			break;
 		s = (t=s)->next;
 	}

=== modified file 'storage_xml.c'
--- storage_xml.c	2011-12-24 18:12:15 +0000
+++ storage_xml.c	2012-07-06 20:36:14 +0000
@@ -66,7 +66,7 @@
 	int i;
 	
 	for( i = 0; attr_names[i]; i ++ )
-		if( g_strcasecmp( attr_names[i], key ) == 0 )
+		if( g_ascii_strcasecmp( attr_names[i], key ) == 0 )
 			return (char*) attr_values[i];
 	
 	return NULL;
@@ -90,7 +90,7 @@
 	{
 		xd->unknown_tag ++;
 	}
-	else if( g_strcasecmp( element_name, "user" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "user" ) == 0 )
 	{
 		char *nick = xml_attr( attr_names, attr_values, "nick" );
 		char *pass = xml_attr( attr_names, attr_values, "password" );
@@ -124,7 +124,7 @@
 		/* Let's not parse anything else if we only have to check
 		   the password. */
 	}
-	else if( g_strcasecmp( element_name, "account" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "account" ) == 0 )
 	{
 		char *protocol, *handle, *server, *password = NULL, *autoconnect, *tag;
 		char *pass_b64 = NULL;
@@ -170,7 +170,7 @@
 		g_free( pass_cr );
 		g_free( password );
 	}
-	else if( g_strcasecmp( element_name, "setting" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "setting" ) == 0 )
 	{
 		char *setting;
 		
@@ -195,7 +195,7 @@
 			g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
 			             "Missing attributes for %s element", element_name );
 	}
-	else if( g_strcasecmp( element_name, "buddy" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "buddy" ) == 0 )
 	{
 		char *handle, *nick;
 		
@@ -212,7 +212,7 @@
 			             "Missing attributes for %s element", element_name );
 		}
 	}
-	else if( g_strcasecmp( element_name, "channel" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "channel" ) == 0 )
 	{
 		char *name, *type;
 		
@@ -236,7 +236,7 @@
 	}
 	/* Backward compatibility: Keep this around for a while for people
 	   switching from BitlBee 1.2.4+. */
-	else if( g_strcasecmp( element_name, "chat" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "chat" ) == 0 )
 	{
 		char *handle, *channel;
 		
@@ -287,17 +287,17 @@
 	{
 		xd->unknown_tag --;
 	}
-	else if( g_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting )
+	else if( g_ascii_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting )
 	{
 		g_free( xd->current_setting );
 		xd->current_setting = NULL;
 	}
-	else if( g_strcasecmp( element_name, "account" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "account" ) == 0 )
 	{
 		xd->current_account = NULL;
 	}
-	else if( g_strcasecmp( element_name, "channel" ) == 0 ||
-	         g_strcasecmp( element_name, "chat" ) == 0 )
+	else if( g_ascii_strcasecmp( element_name, "channel" ) == 0 ||
+	         g_ascii_strcasecmp( element_name, "chat" ) == 0 )
 	{
 		xd->current_channel = NULL;
 	}
@@ -317,7 +317,7 @@
 		   the password, or if we didn't get the chance to check it
 		   yet. */
 	}
-	else if( g_strcasecmp( g_markup_parse_context_get_element( ctx ), "setting" ) == 0 && xd->current_setting )
+	else if( g_ascii_strcasecmp( g_markup_parse_context_get_element( ctx ), "setting" ) == 0 && xd->current_setting )
 	{
 		if( xd->current_account )
 		{

