changeset 6439:650e9b73ba38

[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." committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 12 Aug 2003 05:02:56 +0000
parents b3744996da0d
children ded6796da6b9
files src/util.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);