[gaim-migrate @ 6947]

Tue, 12 Aug 2003 05:02:56 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Tue, 12 Aug 2003 05:02:56 +0000
changeset 6439
cc7e8c6d8bfa
parent 6438
791d34a2869e
child 6440
39809cff8fd9

[gaim-migrate @ 6947]
"Even if the conversion was successful, this may be less than len if there were
partial characters at the end of the input."

src/util.c file | annotate | diff | comparison | revisions
--- a/src/util.c	Tue Aug 12 01:39:36 2003 +0000
+++ b/src/util.c	Tue Aug 12 05:02:56 2003 +0000
@@ -869,12 +869,11 @@
 	}
 
 	utf8 = g_locale_to_utf8(str, -1, &converted, NULL, NULL);
-	if (utf8 && converted == strlen (str)) {
+	if (utf8) 
 		return(utf8);
-	} else if (utf8) {
-		g_free(utf8);
-	}
-
+	
+	g_free(utf8);
+	
 	utf8 = g_convert(str, -1, "UTF-8", "ISO-8859-15", &converted, NULL, NULL);
 	if (utf8 && converted == strlen (str)) {
 		return(utf8);

mercurial