comparison src/protocols/oscar/oscar.c @ 3660:a9445dd25786

[gaim-migrate @ 3789] Hmm committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 13 Oct 2002 01:46:53 +0000
parents 5b439da85c3b
children 1a6d3f3bc682
comparison
equal deleted inserted replaced
3659:5b439da85c3b 3660:a9445dd25786
1775 if (err) { 1775 if (err) {
1776 debug_printf("Unicode IM conversion: %s\n", err->message); 1776 debug_printf("Unicode IM conversion: %s\n", err->message);
1777 tmp = strdup(_("(There was an error receiving this message)")); 1777 tmp = strdup(_("(There was an error receiving this message)"));
1778 } 1778 }
1779 } else if (args->icbmflags & AIM_IMFLAGS_ISO_8859_1) { 1779 } else if (args->icbmflags & AIM_IMFLAGS_ISO_8859_1) {
1780 int i;
1781 tmp = g_convert(args->msg, args->msglen, "UTF-8", "ISO-8859-1", NULL, &convlen, &err); 1780 tmp = g_convert(args->msg, args->msglen, "UTF-8", "ISO-8859-1", NULL, &convlen, &err);
1782 if (err) { 1781 if (err) {
1783 debug_printf("ISO-8859-1 IM conversion: %s\n", err->message); 1782 debug_printf("ISO-8859-1 IM conversion: %s\n", err->message);
1784 tmp = strdup(_("(There was an error receiving this message)")); 1783 tmp = strdup(_("(There was an error receiving this message)"));
1785 } 1784 }
3359 } 3358 }
3360 while (message[i]) { 3359 while (message[i]) {
3361 /* ISO-8859-1 is 0x00-0xbf in the first byte 3360 /* ISO-8859-1 is 0x00-0xbf in the first byte
3362 * followed by 0xc0-0xc3 in the second */ 3361 * followed by 0xc0-0xc3 in the second */
3363 if ((unsigned char)message[i] < 0x80 || 3362 if ((unsigned char)message[i] < 0x80 ||
3364 ((unsigned char)message[i] & 0xc0 == 0x80 && 3363 (((unsigned char)message[i] & 0xc0) == 0x80 &&
3365 (unsigned char)message[i + 1] & 0xfc == 0xc0)) { 3364 ((unsigned char)message[i + 1] & 0xfc) == 0xc0)) {
3366 i++; 3365 i++;
3367 continue; 3366 continue;
3368 } 3367 }
3369 args.flags ^= AIM_IMFLAGS_ISO_8859_1; 3368 args.flags ^= AIM_IMFLAGS_ISO_8859_1;
3370 args.flags |= AIM_IMFLAGS_UNICODE; 3369 args.flags |= AIM_IMFLAGS_UNICODE;