src/log.c

changeset 13161
8f84bea3949f
parent 13160
8177a80d9e27
child 13163
2026e49825df
--- a/src/log.c	Tue Feb 07 16:02:25 2006 +0000
+++ b/src/log.c	Tue Feb 07 16:29:25 2006 +0000
@@ -89,7 +89,14 @@
 #ifdef HAVE_STRUCT_TM_TM_ZONE
 		/* XXX: This is so wrong... */
 		if (log->tm->tm_zone != NULL)
-			log->tm->tm_zone = (const char *)g_strdup(log->tm->tm_zone);
+		{
+			char *tmp = g_locale_from_utf8(log->tm->tm_zone, -1, NULL, NULL, NULL);
+			if (tmp != NULL)
+				log->tm->tm_zone = (const char *)tmp;
+			else
+				/* Just shove the UTF-8 bytes in and hope... */
+				log->tm->tm_zone = (const char *)g_strdup(log->tm->tm_zone);
+		}
 #endif
 	}
 	log->logger = gaim_log_logger_get();

mercurial