Irssi core bugs

Notice: Undefined index: tasklist_type in /var/www/bugs.irssi.org/includes/class.tpl.php(128) : eval()'d code on line 85 Notice: Undefined index: tasklist_type in /var/www/bugs.irssi.org/includes/class.tpl.php(128) : eval()'d code on line 90
  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category recode
  • Assigned To No-one
  • Operating System Solaris
  • Severity High
  • Priority Normal
  • Reported Version Irssi 0.8.10
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 0
  • Private No
Attached to Project: Irssi core bugs
Opened by Juho Vaha-Herttua (juhovh) - 2005-12-26
Last edited by Emanuele Giaquinta (ayin) - 2007-11-18

FS#358 - UTF-8 charset in reconv broken on native Solaris iconv

On at least Solaris 8 iconv and possibly on other systems, conversions where from and to charsets are the same are not supported. So for example "UTF-8 -> UTF-8" conversion will always fail although "foo -> UTF-8" and "UTF-8 -> foo" works with almost any encoding as the value of foo. I suggest the following patch to be applied to reconv.c so that it first tries an "UTF-8 -> charset" conversion and if that fails it will try an "ISO8859-1 -> charset" conversion. I think this is the best way to handle the case if we want to keep the function generic as it's now. The patch follows:

diff -r irssi-0.8.10/src/core/recode.c irssi-0.8.10.patch/src/core/recode.c
50d49
< const char *from="UTF-8";
61c60,62
< recoded = g_convert(str, strlen(str), charset, from, NULL, NULL, NULL);
---
> recoded = g_convert(str, strlen(str), charset, "UTF-8", NULL, NULL, NULL);
> if (recoded == NULL)
> recoded = g_convert(str, strlen(str), charset, "ISO8859-1", NULL, NULL, NULL);

This task does not depend on any other tasks.

Juho Vaha-Herttua (juhovh)
Monday, 26 December 2005, 21:15 GMT
I added the diff also as a file, I pasted it first because I wasn't very well aware how this bug tracker works. Also I said reconv.c earlier although I of course meant recode.c.

Loading...