pidgin: ea303ca5: Rename AIM_CHARSET_CUSTOM to AIM_CHARSET...
markdoliner at pidgin.im
markdoliner at pidgin.im
Sun Sep 6 17:10:45 EDT 2009
-----------------------------------------------------------------
Revision: ea303ca5206ca8f9eb645430e9f1ee7e9ec4ac55
Ancestor: d27c32ca22c544f8f581bf4ea7b9a732f60bce59
Author: markdoliner at pidgin.im
Date: 2009-09-06T21:07:56
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ea303ca5206ca8f9eb645430e9f1ee7e9ec4ac55
Modified files:
libpurple/protocols/oscar/family_icbm.c
libpurple/protocols/oscar/oscar.c
libpurple/protocols/oscar/oscar.h
ChangeLog:
Rename AIM_CHARSET_CUSTOM to AIM_CHARSET_LATIN_1 as described at
http://dev.aol.com/aim/oscar/#ICBM__IM_SECTION_ENCODINGS
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_icbm.c 435af7445549bf9dff51548b7db7085ab4f66cb2
+++ libpurple/protocols/oscar/family_icbm.c 0e2bb3cdad00d000de8475587ad80ef9e2e3381c
@@ -1466,7 +1466,7 @@ static int incomingim_ch1_parsemsgs(Osca
/* Should this be ASCII -> UNICODE -> Custom */
static const guint16 charsetpri[] = {
AIM_CHARSET_ASCII, /* ASCII first */
- AIM_CHARSET_CUSTOM, /* then ISO-8859-1 */
+ AIM_CHARSET_LATIN_1, /* then ISO-8859-1 */
AIM_CHARSET_UNICODE, /* UNICODE as last resort */
};
static const int charsetpricount = 3;
============================================================
--- libpurple/protocols/oscar/oscar.c bd6e9141aed032101cc2031cf3601bef28e73af1
+++ libpurple/protocols/oscar/oscar.c 30e87e6ef00929edd5d21dba83a159533e278e1f
@@ -241,7 +241,7 @@ oscar_charset_check(const char *utf8)
{
if ((unsigned char)utf8[i] > 0x7f) {
/* not ASCII! */
- charset = AIM_CHARSET_CUSTOM;
+ charset = AIM_CHARSET_LATIN_1;
break;
}
i++;
@@ -428,7 +428,7 @@ purple_plugin_oscar_decode_im_part(Purpl
if (charset == AIM_CHARSET_UNICODE) {
charsetstr1 = "UTF-16BE";
charsetstr2 = "UTF-8";
- } else if (charset == AIM_CHARSET_CUSTOM) {
+ } else if (charset == AIM_CHARSET_LATIN_1) {
if ((sourcebn != NULL) && oscar_util_valid_name_icq(sourcebn))
charsetstr1 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
else
@@ -539,7 +539,7 @@ purple_plugin_oscar_convert_to_best_enco
*/
*msg = g_convert(from, -1, charsetstr, "UTF-8", NULL, &msglen, &err);
if (*msg != NULL) {
- *charset = AIM_CHARSET_CUSTOM;
+ *charset = AIM_CHARSET_LATIN_1;
*charsubset = 0x0000;
*msglen_int = msglen;
return;
@@ -2801,7 +2801,7 @@ incomingim_chan4(OscarData *od, FlapConn
gchar *reason = NULL;
if (msg2[5] != NULL)
- reason = purple_plugin_oscar_decode_im_part(account, bn, AIM_CHARSET_CUSTOM, 0x0000, msg2[5], strlen(msg2[5]));
+ reason = purple_plugin_oscar_decode_im_part(account, bn, AIM_CHARSET_LATIN_1, 0x0000, msg2[5], strlen(msg2[5]));
purple_debug_info("oscar",
"Received an authorization request from UIN %u\n",
@@ -4687,7 +4687,7 @@ gchar *purple_prpl_oscar_convert_to_info
if (charset == AIM_CHARSET_UNICODE) {
encoded = g_convert(str, -1, "UTF-16BE", "UTF-8", NULL, ret_len, NULL);
*encoding = "unicode-2-0";
- } else if (charset == AIM_CHARSET_CUSTOM) {
+ } else if (charset == AIM_CHARSET_LATIN_1) {
encoded = g_convert(str, -1, "ISO-8859-1", "UTF-8", NULL, ret_len, NULL);
*encoding = "iso-8859-1";
} else {
@@ -5590,7 +5590,7 @@ static int purple_ssi_authrequest(OscarD
buddy = purple_find_buddy(account, bn);
if (msg != NULL)
- reason = purple_plugin_oscar_decode_im_part(account, bn, AIM_CHARSET_CUSTOM, 0x0000, msg, strlen(msg));
+ reason = purple_plugin_oscar_decode_im_part(account, bn, AIM_CHARSET_LATIN_1, 0x0000, msg, strlen(msg));
data = g_new(struct name_data, 1);
data->gc = gc;
@@ -5827,7 +5827,7 @@ int oscar_send_chat(PurpleConnection *gc
charsetstr = "us-ascii";
else if (charset == AIM_CHARSET_UNICODE)
charsetstr = "unicode-2-0";
- else if (charset == AIM_CHARSET_CUSTOM)
+ else if (charset == AIM_CHARSET_LATIN_1)
charsetstr = "iso-8859-1";
aim_chat_send_im(od, c->conn, 0, buf2, len, charsetstr, "en");
g_free(buf2);
============================================================
--- libpurple/protocols/oscar/oscar.h 99102878d1c14ad9a0e1a6fdb5ce236ea69b9b22
+++ libpurple/protocols/oscar/oscar.h 8e6040772095177f4500880d9d532839a6cbe2f0
@@ -808,9 +808,9 @@ void oscar_chat_destroy(struct chat_conn
#define AIM_IMFLAGS_OFFLINE 0x0800 /* send to offline user */
#define AIM_IMFLAGS_TYPINGNOT 0x1000 /* typing notification */
-#define AIM_CHARSET_ASCII 0x0000
-#define AIM_CHARSET_UNICODE 0x0002 /* UTF-16BE */
-#define AIM_CHARSET_CUSTOM 0x0003
+#define AIM_CHARSET_ASCII 0x0000 /* ISO 646 */
+#define AIM_CHARSET_UNICODE 0x0002 /* ISO 10646 (UTF-16/UCS-2BE) */
+#define AIM_CHARSET_LATIN_1 0x0003 /* ISO 8859-1 */
/*
* Multipart message structures.
More information about the Commits
mailing list