Не съм го тествал, но мисля че това "решава" проблема.
-------------------------------------------
diff -r -u gaim-0.77/src/protocols/oscar/oscar.c gaim-0.77_1251/src/protocols/oscar/oscar.c
--- gaim-0.77/src/protocols/oscar/oscar.c 2004-04-22 04:53:15.000000000 +0300
+++ gaim-0.77_1251/src/protocols/oscar/oscar.c 2004-04-27 03:14:17.000000000 +0300
@@ -394,7 +394,7 @@
utf8 = g_convert(text, textlen, "UTF-8", "UTF-8", NULL, NULL, NULL);
break;
case AIM_IMFLAGS_ISO_8859_1:
- utf8 = g_convert(text, textlen, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
+ utf8 = g_convert(text, textlen, "UTF-8", "CP1251", NULL, NULL, NULL);
break;
case AIM_IMFLAGS_UNICODE:
utf8 = g_convert(text, textlen, "UTF-8", "UCS-2BE", NULL, NULL, NULL);
@@ -2540,15 +2540,15 @@
* such */
if (args->icbmflags & AIM_IMFLAGS_ISO_8859_1)
gaim_debug_info("oscar",
- "Received ISO-8859-1 IM\n");
+ "Received CP1251 IM\n");
if (!args->msg || !args->msglen)
return 1;
- tmp = g_convert(args->msg, args->msglen, "UTF-8", "ISO-8859-1", NULL, &convlen, &err);
+ tmp = g_convert(args->msg, args->msglen, "UTF-8", "CP1251", NULL, &convlen, &err);
if (err) {
gaim_debug_info("oscar",
- "ISO-8859-1 IM conversion: %s\n", err->message);
+ "CP1251 IM conversion: %s\n", err->message);
tmp = g_strdup(_("(There was an error receiving this message)"));
g_error_free(err);
}
@@ -2872,10 +2872,10 @@
msg2 = (gchar **)g_malloc((numtoks+1)*sizeof(gchar *));
for (i=0; msg1[i]; i++) {
gaim_str_strip_cr(msg1[i]);
- msg2[i] = g_convert(msg1[i], strlen(msg1[i]), "UTF-8", "ISO-8859-1", NULL, NULL, &err);
+ msg2[i] = g_convert(msg1[i], strlen(msg1[i]), "UTF-8", "CP1251", NULL, NULL, &err);
if (err) {
gaim_debug_error("oscar",
- "Error converting a string from ISO-8859-1 to "
+ "Error converting a string from CP1251 to "
"UTF-8 in oscar ICBM channel 4 parsing\n");
g_error_free(err);
}
@@ -4616,10 +4616,10 @@
}
} else if (args.flags & AIM_IMFLAGS_ISO_8859_1) {
gaim_debug_info("oscar",
- "Sending ISO-8859-1 IM\n");
+ "Sending CP1251 IM\n");
args.charset = 0x0003;
args.charsubset = 0x0000;
- args.msg = g_convert(tmpmsg, len, "ISO-8859-1", "UTF-8", NULL, &len, &err);
+ args.msg = g_convert(tmpmsg, len, "CP1251", "UTF-8", NULL, &len, &err);
if (err) {
gaim_debug_error("oscar",
"conversion error: %s\n", err->message);
@@ -4701,7 +4701,7 @@
aim_locate_setprofile(od->sess, "unicode-2-0", msg, (msglen > od->rights.maxsiglen ? od->rights.maxsiglen : msglen), NULL, NULL, 0);
g_free(msg);
} else if (flags & AIM_IMFLAGS_ISO_8859_1) {
- msg = g_convert(text_html, strlen(text_html), "ISO-8859-1", "UTF-8", NULL, &msglen, NULL);
+ msg = g_convert(text_html, strlen(text_html), "CP1251", "UTF-8", NULL, &msglen, NULL);
aim_locate_setprofile(od->sess, "iso-8859-1", msg, (msglen > od->rights.maxsiglen ? od->rights.maxsiglen : msglen), NULL, NULL, 0);
g_free(msg);
} else {
@@ -4776,7 +4776,7 @@
g_free(msg);
gc->away = g_strndup(text, od->rights.maxawaymsglen/2);
} else if (flags & AIM_IMFLAGS_ISO_8859_1) {
- msg = g_convert(text_html, strlen(text_html), "ISO-8859-1", "UTF-8", NULL, &msglen, NULL);
+ msg = g_convert(text_html, strlen(text_html), "CP1251", "UTF-8", NULL, &msglen, NULL);
aim_locate_setprofile(od->sess, NULL, NULL, 0, "iso-8859-1", msg,
(msglen > od->rights.maxawaymsglen ? od->rights.maxawaymsglen : msglen));
g_free(msg);
@@ -5645,12 +5645,12 @@
g_error_free(err);
}
} else if (encoding & AIM_IMFLAGS_ISO_8859_1) {
- gaim_debug_info("oscar", "Sending ISO-8859-1 chat\n");
- charset = "iso-8859-1";
- buf2 = g_convert(buf, len, "ISO-8859-1", "UTF-8", NULL, &len, &err);
+ gaim_debug_info("oscar", "Sending CP1251 chat\n");
+ charset = "CP1251";
+ buf2 = g_convert(buf, len, "CP1251", "UTF-8", NULL, &len, &err);
if (err) {
gaim_debug_error("oscar",
- "Error converting to iso-8859-1: %s\n", err->message);
+ "Error converting to CP1251: %s\n", err->message);
g_error_free(err);
err = NULL;
|