Mercurial > pidgin
diff src/protocols/oscar/im.c @ 9806:41b97d72e647
[gaim-migrate @ 10674]
Clean up oscar incoming IM parsing/charset converting.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Sat, 21 Aug 2004 21:53:57 +0000 |
| parents | a4fd6666bb83 |
| children | 0c170246a9ec |
line wrap: on
line diff
--- a/src/protocols/oscar/im.c Sat Aug 21 20:35:23 2004 +0000 +++ b/src/protocols/oscar/im.c Sat Aug 21 21:53:57 2004 +0000 @@ -1316,10 +1316,11 @@ */ static int incomingim_ch1_parsemsgs(aim_session_t *sess, fu8_t *data, int len, struct aim_incomingim_ch1_args *args) { + /* Should this be ASCII -> UNICODE -> Custom */ static const fu16_t charsetpri[] = { - 0x0000, /* ASCII first */ - 0x0003, /* then ISO-8859-1 */ - 0x0002, /* UNICODE as last resort */ + AIM_IMCHARSET_ASCII, /* ASCII first */ + AIM_IMCHARSET_CUSTOM, /* then ISO-8859-1 */ + AIM_IMCHARSET_UNICODE, /* UNICODE as last resort */ }; static const int charsetpricount = 3; int i; @@ -1388,11 +1389,11 @@ args->charsubset = sec->charsubset; /* Set up the simple flags */ - if (args->charset == 0x0000) + if (args->charset == AIM_IMCHARSET_ASCII) ; /* ASCII */ - else if (args->charset == 0x0002) + else if (args->charset == AIM_IMCHARSET_UNICODE) args->icbmflags |= AIM_IMFLAGS_UNICODE; - else if (args->charset == 0x0003) + else if (args->charset == AIM_IMCHARSET_CUSTOM) args->icbmflags |= AIM_IMFLAGS_ISO_8859_1; else if (args->charset == 0xffff) ; /* no encoding (yeep!) */
