Index: dcc.c
===================================================================
--- dcc.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ dcc.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -523,5 +523,5 @@
 		
 		host = ctcp[3];
-		while( *host && isdigit( *host ) ) host++; /* Just digits? */
+		while( *host && g_ascii_isdigit( *host ) ) host++; /* Just digits? */
 		if( *host == '\0' )
 		{
Index: irc_channel.c
===================================================================
--- irc_channel.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ irc_channel.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -575,5 +575,5 @@
 	
 	/* Scan for non-whitespace chars followed by a colon: */
-	for( s = msg; *s && !isspace( *s ) && *s != ':' && *s != ','; s ++ ) {}
+	for( s = msg; *s && !g_ascii_isspace( *s ) && *s != ':' && *s != ','; s ++ ) {}
 	
 	if( *s == ':' || *s == ',' )
@@ -583,5 +583,5 @@
 		memset( to, 0, sizeof( to ) );
 		strncpy( to, msg, s - msg );
-		while( *(++s) && isspace( *s ) ) {}
+		while( *(++s) && g_ascii_isspace( *s ) ) {}
 		msg = s;
 		
Index: irc_im.c
===================================================================
--- irc_im.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ irc_im.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -73,5 +73,5 @@
 		{
 			char *s;
-			for( s = bu->ic->acc->tag; isalnum( *s ); s ++ );
+			for( s = bu->ic->acc->tag; g_ascii_isalnum( *s ); s ++ );
 			/* Only use the tag if we got to the end of the string.
 			   (So allow alphanumerics only. Hopefully not too
@@ -316,5 +316,5 @@
 	   TODO(wilmer): Do the same with away msgs again! */
 	for( s = iu->fullname; *s; s ++ )
-		if( isspace( *s ) ) *s = ' ';
+		if( g_ascii_isspace( *s ) ) *s = ' ';
 	
 	if( ( bu->ic->flags & OPT_LOGGED_IN ) && set_getbool( &bee->set, "display_namechanges" ) )
Index: irc_util.c
===================================================================
--- irc_util.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ irc_util.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -42,7 +42,7 @@
 	
 	/* \d+ */
-	if( !isdigit( *s ) )
+	if( !g_ascii_isdigit( *s ) )
 		return SET_INVALID;
-	while( *s && isdigit( *s ) ) s ++;
+	while( *s && g_ascii_isdigit( *s ) ) s ++;
 	
 	/* EOS? */
@@ -56,7 +56,7 @@
 	
 	/* \d+ */
-	if( !isdigit( *s ) )
+	if( !g_ascii_isdigit( *s ) )
 		return SET_INVALID;
-	while( *s && isdigit( *s ) ) s ++;
+	while( *s && g_ascii_isdigit( *s ) ) s ++;
 	
 	/* EOS */
Index: lib/http_client.c
===================================================================
--- lib/http_client.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ lib/http_client.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -345,10 +345,10 @@
 		/* Might be a \r\n from the last chunk. */
 		s = chunk;
-		while( isspace( *s ) )
+		while( g_ascii_isspace( *s ) )
 			s ++;
 		/* Chunk length. Might be incomplete. */
 		if( s < eos && sscanf( s, "%x", &clen ) != 1 )
 			return CR_ERROR;
-		while( isxdigit( *s ) )
+		while( g_ascii_isxdigit( *s ) )
 			s ++;
 		
Index: lib/ini.c
===================================================================
--- lib/ini.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ lib/ini.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -63,9 +63,9 @@
 	char *e;
 
-	while( isspace( *in ) )
+	while( g_ascii_isspace( *in ) )
 		in++;
 
 	e = in + strlen( in ) - 1;
-	while( e > in && isspace( *e ) )
+	while( e > in && g_ascii_isspace( *e ) )
 		e--;
 	e[1] = 0;
Index: lib/json.c
===================================================================
--- lib/json.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ lib/json.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -53,5 +53,5 @@
 static unsigned char hex_value (json_char c)
 {
-   if (isdigit(c))
+   if (g_ascii_isdigit(c))
       return c - '0';
 
@@ -609,5 +609,5 @@
                      default:
 
-                        if (isdigit (b) || b == '-')
+                        if (g_ascii_isdigit (b) || b == '-')
                         {
                            if (!new_value (&state, &top, &root, &alloc, json_integer))
@@ -616,5 +616,5 @@
                            if (!state.first_pass)
                            {
-                              while (isdigit (b) || b == '+' || b == '-'
+                              while (g_ascii_isdigit (b) || b == '+' || b == '-'
                                         || b == 'e' || b == 'E' || b == '.')
                               {
@@ -706,5 +706,5 @@
             case json_double:
 
-               if (isdigit (b))
+               if (g_ascii_isdigit (b))
                {
                   ++ num_digits;
Index: lib/misc.c
===================================================================
--- lib/misc.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ lib/misc.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -163,5 +163,5 @@
 	while( *in )
 	{
-		if( *in == '<' && ( isalpha( *(in+1) ) || *(in+1) == '/' ) )
+		if( *in == '<' && ( g_ascii_isalpha( *(in+1) ) || *(in+1) == '/' ) )
 		{
 			/* If in points at a < and in+1 points at a letter or a slash, this is probably
@@ -198,5 +198,5 @@
 		{
 			cs = ++in;
-			while( *in && isalpha( *in ) )
+			while( *in && g_ascii_isalpha( *in ) )
 				in ++;
 			
@@ -314,5 +314,5 @@
 	for( i = j = 0; t[i]; i ++, j ++ )
 	{
-		/* Warning: isalnum() is locale-aware, so don't use it here! */
+		/* Warning: g_ascii_isalnum() is locale-aware, so don't use it here! */
 		if( ( t[i] >= 'A' && t[i] <= 'Z' ) ||
 		    ( t[i] >= 'a' && t[i] <= 'z' ) ||
@@ -490,5 +490,5 @@
 	
 	while( *value )
-		if( !isdigit( *value ) )
+		if( !g_ascii_isdigit( *value ) )
 			return 0;
 		else
Index: lib/ssl_gnutls.c
===================================================================
--- lib/ssl_gnutls.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ lib/ssl_gnutls.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -318,5 +318,5 @@
 	gnutls_set_default_priority( conn->session );
 	gnutls_credentials_set( conn->session, GNUTLS_CRD_CERTIFICATE, xcred );
-	if( conn->hostname && !isdigit( conn->hostname[0] ) )
+	if( conn->hostname && !g_ascii_isdigit( conn->hostname[0] ) )
 		gnutls_server_name_set( conn->session, GNUTLS_NAME_DNS,
 		                        conn->hostname, strlen( conn->hostname ) );
Index: lib/ssl_openssl.c
===================================================================
--- lib/ssl_openssl.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ lib/ssl_openssl.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -159,5 +159,5 @@
 	SSL_set_fd( conn->ssl, conn->fd );
 	
-	if( conn->hostname && !isdigit( conn->hostname[0] ) )
+	if( conn->hostname && !g_ascii_isdigit( conn->hostname[0] ) )
 		SSL_set_tlsext_host_name( conn->ssl, conn->hostname );
 	
Index: nick.c
===================================================================
--- nick.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ nick.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -41,5 +41,5 @@
 	do {
 		if (*orig != ' ')
-			new[i++] = tolower( *orig );
+			new[i++] = g_ascii_tolower( *orig );
 	}
 	while (*(orig++));
@@ -144,9 +144,9 @@
 				fmt += 2;
 			}
-			else if( isdigit( *fmt ) )
+			else if( g_ascii_isdigit( *fmt ) )
 			{
 				len = 0;
 				/* Grab a number. */
-				while( isdigit( *fmt ) )
+				while( g_ascii_isdigit( *fmt ) )
 					len = len * 10 + ( *(fmt++) - '0' );
 			}
@@ -331,5 +331,5 @@
 		}
 	}
-	if( isdigit( nick[0] ) )
+	if( g_ascii_isdigit( nick[0] ) )
 	{
 		char *orig;
@@ -351,5 +351,5 @@
 	
 	/* Empty/long nicks are not allowed, nor numbers at [0] */
-	if( !*nick || isdigit( nick[0] ) || strlen( nick ) > MAX_NICK_LENGTH )
+	if( !*nick || g_ascii_isdigit( nick[0] ) || strlen( nick ) > MAX_NICK_LENGTH )
 		return 0;
 	
Index: otr.c
===================================================================
--- otr.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ otr.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -1470,5 +1470,5 @@
 int hexval(char a)
 {
-	int x=tolower(a);
+	int x=g_ascii_tolower(a);
 	
 	if(x>='a' && x<='f')
@@ -1557,5 +1557,5 @@
 	for(i=0; args[i]; i++) {
 		for(j=0; args[i][j]; j++) {
-			char c = toupper(args[i][j]);
+			char c = g_ascii_toupper(args[i][j]);
 			
 			if(n>=40) {
@@ -1621,5 +1621,5 @@
 	for(i=0; args[i]; i++) {
 		for(j=0; args[i][j]; j++) {
-			char c = toupper(args[i][j]);
+			char c = g_ascii_toupper(args[i][j]);
 			
 			if(n>=40) {
Index: protocols/account.c
===================================================================
--- protocols/account.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/account.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -81,5 +81,5 @@
 	if( strcmp( prpl->name, "oscar" ) == 0 )
 	{
-		if( isdigit( a->user[0] ) )
+		if( g_ascii_isdigit( a->user[0] ) )
 			strcpy( tag, "icq" );
 		else
@@ -417,5 +417,5 @@
 	
 	/* Format: /[0-9]+([*+][0-9]+(<[0-9+])?)?/ */
-	while( *value && isdigit( *value ) )
+	while( *value && g_ascii_isdigit( *value ) )
 		p->start = p->start * 10 + *value++ - '0';
 	
@@ -433,5 +433,5 @@
 	
 	/* + or * the delay by this number every time. */
-	while( *value && isdigit( *value ) )
+	while( *value && g_ascii_isdigit( *value ) )
 		p->step = p->step * 10 + *value++ - '0';
 	
@@ -444,5 +444,5 @@
 	p->max = 0;
 	value ++;
-	while( *value && isdigit( *value ) )
+	while( *value && g_ascii_isdigit( *value ) )
 		p->max = p->max * 10 + *value++ - '0';
 	
Index: protocols/jabber/jabber_util.c
===================================================================
--- protocols/jabber/jabber_util.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/jabber/jabber_util.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -321,5 +321,5 @@
 			return FALSE;
 		}
-		if( tolower( jid1[i] ) != tolower( jid2[i] ) )
+		if( g_ascii_tolower( jid1[i] ) != g_ascii_tolower( jid2[i] ) )
 		{
 			return FALSE;
@@ -342,5 +342,5 @@
 	   it's Unicode but feck Unicode. :-P So stop once we see a slash. */
 	for( i = 0; i < len && orig[i] != '/' ; i ++ )
-		new[i] = tolower( orig[i] );
+		new[i] = g_ascii_tolower( orig[i] );
 	for( ; orig[i]; i ++ )
 		new[i] = orig[i];
Index: protocols/jabber/sasl.c
===================================================================
--- protocols/jabber/sasl.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/jabber/sasl.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -187,5 +187,5 @@
 	len = strlen( field );
 	
-	while( isspace( *data ) || *data == ',' )
+	while( g_ascii_isspace( *data ) || *data == ',' )
 		data ++;
 	
@@ -210,5 +210,5 @@
 			if( data[i] == ',' )
 			{
-				while( isspace( data[i] ) || data[i] == ',' )
+				while( g_ascii_isspace( data[i] ) || data[i] == ',' )
 					i ++;
 				
Index: protocols/msn/msn.c
===================================================================
--- protocols/msn/msn.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/msn/msn.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -377,5 +377,5 @@
 	g_tree_insert( md->domaintree, bu->handle, bu );
 	
-	for( handle = bu->handle; isdigit( *handle ); handle ++ );
+	for( handle = bu->handle; g_ascii_isdigit( *handle ); handle ++ );
 	if( *handle == ':' )
 	{
Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/msn/ns.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -581,5 +581,5 @@
 		ic->flags |= OPT_PONGED;
 	}
-	else if( isdigit( cmd[0][0] ) )
+	else if( g_ascii_isdigit( cmd[0][0] ) )
 	{
 		int num = atoi( cmd[0] );
@@ -997,5 +997,5 @@
 	/* This might be a federated contact. Get its network number,
 	   prefixed to bu->handle with a colon. Default is 1. */
-	for( handle = bu->handle; isdigit( *handle ); handle ++ )
+	for( handle = bu->handle; g_ascii_isdigit( *handle ); handle ++ )
 		type = type * 10 + *handle - '0';
 	if( *handle == ':' )
Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/msn/sb.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -506,5 +506,5 @@
 	else if( strcmp( cmd[0], "CAL" ) == 0 )
 	{
-		if( num_parts < 4 || !isdigit( cmd[3][0] ) )
+		if( num_parts < 4 || !g_ascii_isdigit( cmd[3][0] ) )
 		{
 			msn_sb_destroy( sb );
@@ -645,5 +645,5 @@
 		}
 	}
-	else if( isdigit( cmd[0][0] ) )
+	else if( g_ascii_isdigit( cmd[0][0] ) )
 	{
 		int num = atoi( cmd[0] );
Index: protocols/oscar/auth.c
===================================================================
--- protocols/oscar/auth.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/oscar/auth.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -125,5 +125,5 @@
 		return -EINVAL;
 
-	if (isdigit(sn[0]) && set_getbool(&ic->acc->set, "old_icq_auth"))
+	if (g_ascii_isdigit(sn[0]) && set_getbool(&ic->acc->set, "old_icq_auth"))
 		return goddamnicq(sess, conn, sn);
 
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/oscar/oscar.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -368,5 +368,5 @@
 {
 	set_t *s;
-	gboolean icq = isdigit(acc->user[0]);
+	gboolean icq = g_ascii_isdigit(acc->user[0]);
 	
 	if (icq) {
@@ -394,5 +394,5 @@
 	struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1);
 
-	if (isdigit(acc->user[0]))
+	if (g_ascii_isdigit(acc->user[0]))
 		odata->icq = TRUE;
 	else
@@ -2500,9 +2500,9 @@
 	char * chatname, *s;
 	
-	chatname = g_strdup_printf("%s%s%d", isdigit(*ic->acc->user) ? "icq" : "",
+	chatname = g_strdup_printf("%s%s%d", g_ascii_isdigit(*ic->acc->user) ? "icq" : "",
 	                           ic->acc->user, chat_id++);
 	
 	for (s = chatname; *s; s ++)
-		if (!isalnum(*s))
+		if (!g_ascii_isalnum(*s))
 			*s = '0';
 	
Index: protocols/oscar/oscar_util.c
===================================================================
--- protocols/oscar/oscar_util.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/oscar/oscar_util.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -57,5 +57,5 @@
 				curPtr2++;
 		} else {
-			if ( toupper(*curPtr1) != toupper(*curPtr2))
+			if ( g_ascii_toupper(*curPtr1) != g_ascii_toupper(*curPtr2))
 				return 1;
 			curPtr1++;
Index: protocols/purple/purple.c
===================================================================
--- protocols/purple/purple.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/purple/purple.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -61,5 +61,5 @@
 		while( *a == '_' ) a ++;
 		while( *b == '_' ) b ++;
-		if( tolower( *a ) != tolower( *b ) )
+		if( g_ascii_tolower( *a ) != g_ascii_tolower( *b ) )
 			return FALSE;
 		
@@ -1148,5 +1148,5 @@
 				{
 					n = strlen( value ) - 1;
-					while( isspace( value[n] ) )
+					while( g_ascii_isspace( value[n] ) )
 						n --;
 					g_string_append_len( info, value, n + 1 );
Index: protocols/skype/skype.c
===================================================================
--- protocols/skype/skype.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/skype/skype.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -514,5 +514,5 @@
 				char *iptr = sd->info_sex;
 				while (*iptr++)
-					*iptr = tolower(*iptr);
+					*iptr = g_ascii_tolower(*iptr);
 				g_string_append_printf(st,
 					"Gender: %s\n", sd->info_sex);
Index: protocols/twitter/twitter.c
===================================================================
--- protocols/twitter/twitter.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/twitter/twitter.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -459,7 +459,7 @@
 
 			strcpy(pin, message);
-			for (s = pin + sizeof(pin) - 2; s > pin && isspace(*s); s--)
+			for (s = pin + sizeof(pin) - 2; s > pin && g_ascii_isspace(*s); s--)
 				*s = '\0';
-			for (s = pin; *s && isspace(*s); s++) {
+			for (s = pin; *s && g_ascii_isspace(*s); s++) {
 			}
 
Index: protocols/yahoo/yahoo_httplib.c
===================================================================
--- protocols/yahoo/yahoo_httplib.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ protocols/yahoo/yahoo_httplib.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -152,5 +152,5 @@
 static int isurlchar(unsigned char c)
 {
-	return (isalnum(c));
+	return (g_ascii_isalnum(c));
 }
 
Index: set.c
===================================================================
--- set.c	(revision 6f10697380c620065731a5beece95c0f5bd652a0)
+++ set.c	(revision 6b13103dad92d505e038c268af66aeb04b7b4d87)
@@ -226,5 +226,5 @@
 	
 	for( ; *s; s ++ )
-		if( !isdigit( *s ) )
+		if( !g_ascii_isdigit( *s ) )
 			return SET_INVALID;
 	
