From: <the...@us...> - 2006-12-11 05:35:19
|
Revision: 17956 http://svn.sourceforge.net/gaim/?rev=17956&view=rev Author: thekingant Date: 2006-12-10 21:35:19 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Apparently when Win AIM 6.0 sees "us-ascii" it parses the incoming message as Windows CP-1252. We might as well do the same thing, since there isn't any particular reason for us to parse us-ascii as UTF-8. Modified Paths: -------------- trunk/libgaim/protocols/oscar/oscar.c Modified: trunk/libgaim/protocols/oscar/oscar.c =================================================================== --- trunk/libgaim/protocols/oscar/oscar.c 2006-12-11 05:29:50 UTC (rev 17955) +++ trunk/libgaim/protocols/oscar/oscar.c 2006-12-11 05:35:19 UTC (rev 17956) @@ -303,18 +303,20 @@ gaim_debug_info("oscar", "Empty encoding, assuming UTF-8\n"); } else if (!strcasecmp(encoding, "iso-8859-1")) { utf8 = g_convert(text, textlen, "UTF-8", "iso-8859-1", NULL, NULL, NULL); - } else if (!strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1")) { + } else if (!strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1") || + !strcasecmp(encoding, "us-ascii")) + { utf8 = g_convert(text, textlen, "UTF-8", "Windows-1252", NULL, NULL, NULL); } else if (!strcasecmp(encoding, "unicode-2-0")) { utf8 = g_convert(text, textlen, "UTF-8", "UCS-2BE", NULL, NULL, NULL); - } else if (strcasecmp(encoding, "us-ascii") && strcmp(encoding, "utf-8")) { + } else if (strcasecmp(encoding, "utf-8")) { gaim_debug_warning("oscar", "Unrecognized character encoding \"%s\", " "attempting to convert to UTF-8 anyway\n", encoding); utf8 = g_convert(text, textlen, "UTF-8", encoding, NULL, NULL, NULL); } /* - * If utf8 is still NULL then either the encoding is us-ascii/utf-8 or + * If utf8 is still NULL then either the encoding is utf-8 or * we have been unable to convert the text to utf-8 from the encoding * that was specified. So we check if the text is valid utf-8 then * just copy it. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |