# HG changeset patch # User Mark Doliner # Date 1093923447 0 # Node ID 1806abd8ccbc66ebde84bb54e1694d585e1f64ed # Parent c203312d822402e06fa12b5d864d8d10d4208034 [gaim-migrate @ 10811] Jimmy Eat World is The Good. committer: Tailor Script diff -r c203312d8224 -r 1806abd8ccbc ChangeLog --- a/ChangeLog Tue Aug 31 01:58:52 2004 +0000 +++ b/ChangeLog Tue Aug 31 03:37:27 2004 +0000 @@ -4,6 +4,8 @@ * Drag-and-drop buddy support for the Invite dialog (Stu Tomlinson) * Drag-and-drop buddy support for the Pounce dialog (Stu Tomlinson) * View Chat log available from the interface (Daniel Atallah) + * Ability to receive offline messages in character encodings + other than ASCII (thanks to Nick Sukharev) Bug Fixes: * Compile with gtk 2.5.x (Gary Kramlich) diff -r c203312d8224 -r 1806abd8ccbc src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Tue Aug 31 01:58:52 2004 +0000 +++ b/src/protocols/oscar/oscar.c Tue Aug 31 03:37:27 2004 +0000 @@ -3611,8 +3611,16 @@ "Received a channel 4 message of type 0x%02hhx.\n", args->type); - /* Split up the message at the delimeter character, then convert each string to UTF-8 */ - msg1 = g_strsplit(args->msg, "\376", 0); + /* + * Split up the message at the delimeter character, then convert each + * string to UTF-8. Unless, of course, this is a type 1 message. If + * this is a type 1 message, then the delimiter 0xfe could be a valid + * character in whatever encoding the message was sent in. Type 1 + * messages are always made up of only one part, so we can easily account + * for this suck-ass part of the protocol by splitting the string into at + * most 1 baby string. + */ + msg1 = g_strsplit(args->msg, "\376", (args->type == 0x01 ? 1 : 0)); for (numtoks=0; msg1[numtoks]; numtoks++); msg2 = (gchar **)g_malloc((numtoks+1)*sizeof(gchar *)); for (i=0; msg1[i]; i++) {