ports/50675: gaim/irc i18n fix
Alexander Nedotsukov
bland at mail.ru
Mon Apr 7 13:10:14 UTC 2003
>Number: 50675
>Category: ports
>Synopsis: gaim/irc i18n fix
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 07 06:10:10 PDT 2003
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list