# HG changeset patch # User Ethan Blanton # Date 1089223019 0 # Node ID 4d39f4d1034b781182c7cfdf8795fe3072a80511 # Parent 7a65fdba750f135c71558410ee0f9044b0860f88 [gaim-migrate @ 10301] This changes Oscar to use g_utf8_validate for UTF-8 validation, rather than attempting a conversion from UTF-8 to UTF-8, as the latter appears to be problematic with some iconvs. This causes Oscar to print a conversion failure message (ala IRC) if we receive non-ASCII marked as such -- I don't think this is a problem, as I believe the ICQ funkiness is marked as ISO-8859-1, but if you get the message let me know. committer: Tailor Script diff -r 7a65fdba750f -r 4d39f4d1034b src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Wed Jul 07 16:32:05 2004 +0000 +++ b/src/protocols/oscar/oscar.c Wed Jul 07 17:56:59 2004 +0000 @@ -399,7 +399,10 @@ switch (flags) { case 0: - utf8 = g_convert(text, textlen, "UTF-8", "UTF-8", NULL, NULL, NULL); + if (!g_utf8_validate(text, textlen, NULL)) + utf8 = g_strdup(_("(There was an error converting this message. The buddy you are speaking to most likely has a buggy client.)")); + else + utf8 = g_strdup(text); break; case AIM_IMFLAGS_ISO_8859_1: utf8 = g_convert(text, textlen, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);