Tue, 12 Aug 2003 05:02:56 +0000
[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);