diff -ur gaim-1.0.0/src/protocols/oscar/oscar.c gaim-1.0.0mx/src/protocols/oscar/oscar.c --- gaim-1.0.0/src/protocols/oscar/oscar.c 2004-09-08 04:49:08.000000000 +0300 +++ gaim-1.0.0mx/src/protocols/oscar/oscar.c 2004-09-19 12:26:50.000000000 +0300 @@ -56,7 +56,7 @@ #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3" #define OSCAR_CONNECT_STEPS 6 -#define OSCAR_DEFAULT_CUSTOM_ENCODING "ISO-8859-1" +#define OSCAR_DEFAULT_CUSTOM_ENCODING "CP1251" static GaimPlugin *my_protocol = NULL; @@ -417,7 +417,7 @@ if ((charsetstr == NULL) || (*charsetstr == '\0')) return NULL; - if (strcasecmp("UTF-8", charsetstr)) { + if ( (isUTF8(data,datalen)==0) && strcasecmp("UTF-8", charsetstr)) { if (fallback) ret = g_convert_with_fallback(data, datalen, "UTF-8", charsetstr, "?", NULL, NULL, &err); else @@ -559,6 +559,49 @@ return; } + +int isUTF8(char *str, size_t len) +{ + size_t i=0,tomatch; + + while (i