Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oscar.c @ 29130:f8da53e381dd
Improved handling of the 0x00d charset in AIM, which is sent by mobile devices speaking ISO-8859-1. Try UTF-8 first (the encoding sent by iChat in a Direct IM with non-ASCII characters), then fall back to ISO-8859-1. Fixes #a13544, a bug created with the fix for iChat DIM encoding new in libpurple 2.6.4"
applied changes from 6f3a1b3c52803e11d4cda1e0537c1270599e8d8e
through ed0a2a35c7e22519df27c50069c22b03e01c027a
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Fri, 04 Dec 2009 02:24:41 +0000 |
parents | 7e4117c5372a |
children | 4cb8d0fcfd2f 49f881831eb9 |
comparison
equal
deleted
inserted
replaced
29129:ebb424b7e0a1 | 29130:f8da53e381dd |
---|---|
455 } else if (charset == AIM_CHARSET_ASCII) { | 455 } else if (charset == AIM_CHARSET_ASCII) { |
456 /* Should just be "ASCII" */ | 456 /* Should just be "ASCII" */ |
457 charsetstr1 = "ASCII"; | 457 charsetstr1 = "ASCII"; |
458 charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); | 458 charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); |
459 } else if (charset == 0x000d) { | 459 } else if (charset == 0x000d) { |
460 /* iChat sending unicode over a Direct IM connection = Unicode */ | 460 /* iChat sending unicode over a Direct IM connection = UTF-8 */ |
461 /* Mobile AIM client on a Nokia 3100 and an LG VX6000 = ISO-8859-1 */ | 461 /* Mobile AIM client on multiple devices (including Blackberry Tour, Nokia 3100, and LG VX6000) = ISO-8859-1 */ |
462 charsetstr1 = "UTF-16BE"; | 462 charsetstr1 = "UTF-8"; |
463 charsetstr2 = "UTF-8"; | 463 charsetstr2 = "ISO-8859-1"; |
464 charsetstr3 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); | 464 charsetstr3 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); |
465 } else { | 465 } else { |
466 /* Unknown, hope for valid UTF-8... */ | 466 /* Unknown, hope for valid UTF-8... */ |
467 charsetstr1 = "UTF-8"; | 467 charsetstr1 = "UTF-8"; |
468 charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); | 468 charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); |