Gaim with underclared charsets support for oscar protocol Original gaim (net/gaim) for oscar protocol supporting only ISO-8859-1 charset. Patch in files/patch-oscar.c adding change undeclared charsets for oscar protocol
>Submitter-Id: current-users >Originator: Andrey Slusar >Organization: Santinel >Confidential: no >Synopsis: ports/68112 [NEW PORT] russian/gaim: gaim with underclared charsets support for oscar protocol >Severity: non-critical >Priority: medium >Category: ports >Class: change-request >Release: FreeBSD 5.2-CURRENT i386 >Environment: System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Fri Jun 18 00:59:25 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386 >Description: Previous shar contains mistake. Correct shar in section Fix >How-To-Repeat: >Fix: --- ru-gaim.port begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/russian/gaim/ # /usr/ports/russian/gaim/Makefile # /usr/ports/russian/gaim/files # /usr/ports/russian/gaim/files/patch-oscar.c # echo c - /usr/ports/russian/gaim/ mkdir -p /usr/ports/russian/gaim/ > /dev/null 2>&1 echo x - /usr/ports/russian/gaim/Makefile sed 's/^X//' >/usr/ports/russian/gaim/Makefile << 'END-of-/usr/ports/russian/gaim/Makefile' X# New ports collection makefile for: ru-gaim X# Date created: 19 Jun 2004 X# Whom: Andrey Slusar <vasallia@ukr.net> X# X# $FreeBSD$ X# X XPORTNAME= gaim XCATEGORIES= russian X XMAINTAINER= vasallia@ukr.net XCOMMENT= Gaim with underclared charsets support for oscar protocol X XMASTERDIR= ${.CURDIR}/../../net/gaim X XCONFLICTS= gaim-[0-9]* X X.include "${MASTERDIR}/Makefile" END-of-/usr/ports/russian/gaim/Makefile echo c - /usr/ports/russian/gaim/files mkdir -p /usr/ports/russian/gaim/files > /dev/null 2>&1 echo x - /usr/ports/russian/gaim/files/patch-oscar.c sed 's/^X//' >/usr/ports/russian/gaim/files/patch-oscar.c << 'END-of-/usr/ports/russian/gaim/files/patch-oscar.c' X--- src/protocols/oscar/oscar.c.orig 2004-05-30 21:04:55.000000000 +0400 X+++ src/protocols/oscar/oscar.c 2004-06-05 22:14:22.000000000 +0400 X@@ -3019,6 +3019,7 @@ X GError *err = NULL; X struct buddyinfo *bi; X const char *iconfile; X+ char *charset; X X bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(account, userinfo->sn)); X if (!bi) { X@@ -3110,10 +3112,11 @@ X if (!args->msg || !args->msglen) X return 1; X X- tmp = g_convert(args->msg, args->msglen, "UTF-8", "ISO-8859-1", NULL, &convlen, &err); X+ charset = gaim_account_get_string(account, "plain_charset", "ISO-8859-1"); X+ tmp = g_convert(args->msg, args->msglen, "UTF-8", charset, NULL, &convlen, &err); X if (err) { X- gaim_debug_info("oscar", X- "ISO-8859-1 IM conversion: %s\n", err->message); X+ gaim_debug(GAIM_DEBUG_INFO, "oscar", X+ "%s IM conversion: %s\n", charset, err->message); X tmp = g_strdup(_("(There was an error receiving this message)")); X g_error_free(err); X } X@@ -5133,6 +5136,8 @@ X GError *err = NULL; X const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc)); X char *tmpmsg = NULL, *tmpmsg2 = NULL; X+ GaimAccount *account = gc->account; X+ char *charset; X X if (dim && dim->connected) { X /* If we're directly connected, send a direct IM */ X@@ -5233,7 +5238,8 @@ X } X len = strlen(tmpmsg); X X- args.flags |= oscar_encoding_check(tmpmsg); X+ if(!(gaim_account_get_bool(account, "send_plain", FALSE))) X+ args.flags |= oscar_encoding_check(tmpmsg); X if (args.flags & AIM_IMFLAGS_UNICODE) { X gaim_debug_info("oscar", "Sending Unicode IM\n"); X args.charset = 0x0002; X@@ -5272,7 +5278,10 @@ X } else { X args.charset = 0x0000; X args.charsubset = 0x0000; X- args.msg = tmpmsg; X+ charset = gaim_account_get_string(account, "plain_charset", "ISO-8859-1"); X+ args.msg = g_convert(tmpmsg, len, charset, "UTF-8", NULL, &len, &err); X+ if (err) gaim_debug(GAIM_DEBUG_ERROR, "oscar", X+ "conversion error: %s\n", err->message); X } X args.msglen = len; X X@@ -7230,6 +7239,17 @@ X option = gaim_account_option_int_new(_("Auth port"), "port", 5190); X prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, X option); X+ option = gaim_account_option_string_new( X+ _("Charset for plain text messages"), X+ "plain_charset", "ISO-8859-1"); X+ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, X+ option); X+ X+ option = gaim_account_option_bool_new( X+ _("Send messages in plain text"), X+ "send_plain", FALSE); X+ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, X+ option); X X my_protocol = plugin; X } END-of-/usr/ports/russian/gaim/files/patch-oscar.c exit --- ru-gaim.port ends here ---
Responsible Changed From-To: freebsd-ports-bugs->sem Take it.
State Changed From-To: open->closed Committed, thanks!