From bland@mail.ru  Mon Apr  7 06:01:22 2003
Return-Path: <bland@mail.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 5C02737B401; Mon,  7 Apr 2003 06:01:22 -0700 (PDT)
Received: from mps6.plala.or.jp (c149240.vh.plala.or.jp [210.150.149.240])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id CF97643FBD; Mon,  7 Apr 2003 06:01:20 -0700 (PDT)
	(envelope-from bland@mail.ru)
Received: from bbnest.dyndns.org ([218.47.35.39]) by mps6.plala.or.jp
          with ESMTP
          id <20030407130119.OIVF11337.mps6.plala.or.jp@bbnest.dyndns.org>;
          Mon, 7 Apr 2003 22:01:19 +0900
Received: from bbnest.dyndns.org (bland@localhost [127.0.0.1])
	by bbnest.dyndns.org (8.12.8/8.12.7) with ESMTP id h37D1Il0063402;
	Mon, 7 Apr 2003 22:01:18 +0900 (JST)
	(envelope-from bland@bbnest.dyndns.org)
Received: (from bland@localhost)
	by bbnest.dyndns.org (8.12.8/8.12.8/Submit) id h37D1IG3063401;
	Mon, 7 Apr 2003 22:01:18 +0900 (JST)
Message-Id: <200304071301.h37D1IG3063401@bbnest.dyndns.org>
Date: Mon, 7 Apr 2003 22:01:18 +0900 (JST)
From: Alexander Nedotsukov <bland@mail.ru>
Reply-To: Alexander Nedotsukov <bland@mail.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: marcus@freebsd.org
Subject: gaim/irc i18n fix
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50675
>Category:       ports
>Synopsis:       gaim/irc i18n fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    marcus
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 07 06:10:10 PDT 2003
>Closed-Date:    Mon Apr 07 13:00:58 PDT 2003
>Last-Modified:  Mon Apr 07 13:00:58 PDT 2003
>Originator:     Alexander Nedotsukov
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD bbnest.dyndns.org 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sun Mar 23 18:09:30 JST 2003 bland@bbnest.dyndns.org:/usr/obj/usr/src/sys/SU i386


	
>Description:
Gaim irc protocol module misses i18n conversion for topic messages.
Authors mailed.
	
>How-To-Repeat:
Attach to any irc server. Join to channel where you be able to change the topic.
Try to set topic to something non-latin.
	
>Fix:
apply the patch attaced
	

--- patch-irc.c begins here ---
--- irc.c.orig	Wed Mar 12 11:50:45 2003
+++ irc.c	Wed Mar 12 12:20:56 2003
@@ -699,9 +699,11 @@
 
 	if ((c = irc_find_chat(gc, text))) {
 		char buf[IRC_BUF_LEN];
-		gaim_chat_set_topic(GAIM_CHAT(c), NULL, po);
+		char *utf8 = irc_recv_convert(gc, po);
+		gaim_chat_set_topic(GAIM_CHAT(c), NULL, utf8);
 		g_snprintf(buf, sizeof(buf), _("<B>%s has changed the topic to: %s</B>"),
-			   text, po);
+			   text, utf8);
+		g_free(utf8);
 
 		gaim_conversation_write(c, NULL, buf, -1, WFLAG_SYSTEM, time(NULL));
 	}
@@ -1616,12 +1618,14 @@
 {
 	struct gaim_conversation *c = irc_find_chat(gc, word[3]);
 	char *topic = *word_eol[4] == ':' ? word_eol[4] + 1 : word_eol[4];
-	char buf[IRC_BUF_LEN];
 
 	if (c) {
-		gaim_chat_set_topic(GAIM_CHAT(c), nick, topic);
+		char buf[IRC_BUF_LEN];
+		char *utf8 = irc_recv_convert(gc, topic);
+		gaim_chat_set_topic(GAIM_CHAT(c), nick, utf8);
 		g_snprintf(buf, sizeof(buf),
-				   _("<B>%s has changed the topic to: %s</B>"), nick, topic);
+				   _("<B>%s has changed the topic to: %s</B>"), nick, utf8);
+		g_free(utf8);
 
 		gaim_conversation_write(c, NULL, buf, -1, WFLAG_SYSTEM, time(NULL));
 	}
--- patch-irc.c ends here ---



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->marcus 
Responsible-Changed-By: marcus 
Responsible-Changed-When: Mon Apr 7 12:51:30 PDT 2003 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50675 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Mon Apr 7 13:00:43 PDT 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50675 
>Unformatted:
