Mercurial > pidgin.yaz
changeset 9919:1806abd8ccbc
[gaim-migrate @ 10811]
Jimmy Eat World is The Good.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 31 Aug 2004 03:37:27 +0000 |
parents | c203312d8224 |
children | a58f010171f9 |
files | ChangeLog src/protocols/oscar/oscar.c |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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++) {