summaryrefslogtreecommitdiff
path: root/libpurple
diff options
context:
space:
mode:
authorMark Doliner <markdoliner@pidgin.im>2009-09-06 21:07:56 +0000
committerMark Doliner <markdoliner@pidgin.im>2009-09-06 21:07:56 +0000
commit11b1aab23f580c50a75e09779dedf77ff7fe16d3 (patch)
tree6bf02f328a74ffe6ac0feda511d6b583eb46db95 /libpurple
parentd5642149c6b598444891741a9636a22a238114b5 (diff)
downloadpidgin-11b1aab23f580c50a75e09779dedf77ff7fe16d3.tar.gz
Rename AIM_CHARSET_CUSTOM to AIM_CHARSET_LATIN_1 as described at
http://dev.aol.com/aim/oscar/#ICBM__IM_SECTION_ENCODINGS
Diffstat (limited to 'libpurple')
-rw-r--r--libpurple/protocols/oscar/family_icbm.c2
-rw-r--r--libpurple/protocols/oscar/oscar.c14
-rw-r--r--libpurple/protocols/oscar/oscar.h6
3 files changed, 11 insertions, 11 deletions
diff --git a/libpurple/protocols/oscar/family_icbm.c b/libpurple/protocols/oscar/family_icbm.c
index bbfb8a4bea..dee636cc02 100644
--- a/libpurple/protocols/oscar/family_icbm.c
+++ b/libpurple/protocols/oscar/family_icbm.c
@@ -1466,7 +1466,7 @@ static int incomingim_ch1_parsemsgs(OscarData *od, aim_userinfo_t *userinfo, gui
/* 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;
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
index 0d8c9de0cc..7ab20b3e99 100644
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -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(PurpleAccount *account, const char *sourcebn,
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_encoding(PurpleConnection *gc,
*/
*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, FlapConnection *conn, aim_userinfo_t *userinfo,
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_infotext(const gchar *str, gsize *ret_len, c
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(OscarData *od, FlapConnection *conn, FlapFrame
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, int id, const char *message, PurpleMes
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);
diff --git a/libpurple/protocols/oscar/oscar.h b/libpurple/protocols/oscar/oscar.h
index 80e151de28..e26c38f007 100644
--- a/libpurple/protocols/oscar/oscar.h
+++ b/libpurple/protocols/oscar/oscar.h
@@ -808,9 +808,9 @@ void oscar_chat_destroy(struct chat_connection *cc);
#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.