diff libpurple/protocols/oscar/oscar.h @ 17632:36ebcb33e2eb

This fixes a bustination of the official ICQ client in at least some locales. For away (and possibly other) messages, apparently the official ICQ (5.1?) client of some locales converts messages which are stored in UTF-8 from a locale-native character set to UCS-2BE; this results in something which, when decoded "correctly", is gibberish. Instead, we first try decoding from UCS-2BE to the locale-specific character set, and if that validates as UTF-8, we display it, instead. Since UTF-8 is relatively picky, hopefully this won't break too many sane clients.
author Ethan Blanton <elb@pidgin.im>
date Thu, 14 Jun 2007 18:20:53 +0000
parents 43be5361c4dc
children a244c34ce59c
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.h	Thu Jun 14 16:17:07 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.h	Thu Jun 14 18:20:53 2007 +0000
@@ -934,7 +934,7 @@
 /* 0x0014 */ int aim_im_sendmtn(OscarData *od, guint16 type1, const char *sn, guint16 type2);
 void aim_icbm_makecookie(guchar* cookie);
 gchar *oscar_encoding_extract(const char *encoding);
-gchar *oscar_encoding_to_utf8(const char *encoding, const char *text, int textlen);
+gchar *oscar_encoding_to_utf8(PurpleAccount *account, const char *encoding, const char *text, int textlen);
 gchar *purple_plugin_oscar_decode_im_part(PurpleAccount *account, const char *sourcesn, guint16 charset, guint16 charsubset, const gchar *data, gsize datalen);