Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 4662:6d8a3e81db48
[gaim-migrate @ 4973]
I removed AIM_IMFLAGS_CUSTOMCHARSET because I think it's a little
misleading, and a little silly.
3rd party client developers!!!
You must set args.charset and args.charsubset before calling
aim_im_sendch1_ext. Just set them to 0 for plain ASCII.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 07 Mar 2003 06:39:10 +0000 |
parents | 745f583372cd |
children | eab1309693b8 |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Fri Mar 07 06:00:37 2003 +0000 +++ b/src/protocols/oscar/oscar.c Fri Mar 07 06:39:10 2003 +0000 @@ -1995,13 +1995,16 @@ debug_printf("Can't stat buddy icon file!\n"); } + debug_printf("Character set is %hu %hu\n", args->charset, args->charsubset); if (args->icbmflags & AIM_IMFLAGS_UNICODE) { /* This message is marked as UNICODE, so we have to * convert it to utf-8 before handing it to the gaim core. * This conversion should *never* fail, if it does it * means that either the incoming ICBM is corrupted or - * there is something we don't understand about it. */ - /* For the record, AIM Unicode is big-endian UCS-2 */ + * there is something we don't understand about it. + * For the record, AIM Unicode is big-endian UCS-2 */ + + debug_printf("Received UNICODE IM\n"); if (!args->msg || !args->msglen) return 1; @@ -2019,9 +2022,8 @@ * gaim (everything before 0.60) and other broken clients * that will happily send ISO-8859-1 without marking it as * such */ - if (args->icbmflags & AIM_IMFLAGS_ISO_8859_1) { + if (args->icbmflags & AIM_IMFLAGS_ISO_8859_1) debug_printf("Received ISO-8859-1 IM\n"); - } if (!args->msg || !args->msglen) return 1; @@ -2033,10 +2035,6 @@ } } - if (args->icbmflags & AIM_IMFLAGS_CUSTOMCHARSET) { - debug_printf("Custom character set: %hu %hu\n", args->charset, args->charsubset); - } - if (args->icbmflags & AIM_IMFLAGS_TYPINGNOT) { char *who = normalize(userinfo->sn); if (!g_hash_table_lookup(od->supports_tn, who)) @@ -3880,6 +3878,8 @@ args.flags |= check_encoding(message); if (args.flags & AIM_IMFLAGS_UNICODE) { debug_printf("Sending Unicode IM\n"); + args.charset = 0x0002; + args.charsubset = 0x0002; args.msg = g_convert(message, len, "UCS-2BE", "UTF-8", NULL, &len, &err); if (err) { debug_printf("Error converting a unicode message: %s\n", err->message); @@ -3889,6 +3889,8 @@ } } else if (args.flags & AIM_IMFLAGS_ISO_8859_1) { debug_printf("Sending ISO-8859-1 IM\n"); + args.charset = 0x0003; + args.charsubset = 0x0003; args.msg = g_convert(message, len, "ISO-8859-1", "UTF-8", NULL, &len, &err); if (err) { debug_printf("conversion error: %s\n", err->message); @@ -3901,6 +3903,8 @@ } } } else { + args.charset = 0x0000; + args.charsubset = 0x0000; args.msg = message; } args.msglen = len;