Notes |
(0006244)
skayser (administrator)
2009-06-02 17:58
|
I have just had the same problem with one of my co-workers, but with a locale != C/POSIX. Underlying issue was not with mutt, but that he had the "evil" LD_LIBRARY_PATH set and thus mutt runtime-linked against a non-csw libiconv.
$ echo $LD_LIBRARY_PATH
/usr/sfw/lib:/opt/sfw/lib:/usr/lib:/usr/openwin/lib:/usr/local/kde/qt/lib:/usr/dt/lib:/usr/local/kde/lib:/usr/local/lib
$ ldd /opt/csw/bin/mutt
...
libiconv.so.2 => /usr/local/lib/libiconv.so.2
Getting rid of $LD_LIBRARY_PATH solved the issue. bfr-murphy, if this is still an issue for you, can you please check whether you have $LD_LIBRARY_PATH set? Providing the output of "set" and "ldd /opt/csw/bin/mutt" might also help. |
|
(0006245)
bfr-murphy (reporter)
2009-06-02 18:34
edited on: 2009-06-02 18:36
|
I do not have $LD_LIBRARY_PATH set.
I have uploaded the output of 'ldd /opt/csw/bin/mutt'. The /opt/csw/bin/mutt binary is using the copy of libiconv in the /opt/csw/lib directory.
|
|
(0006247)
phil (reporter)
2009-06-02 20:22
|
Could this actually be considered a bug in our libidn package?
Hmm.. sun has SUNWidn.. but it does not appear to have a libidn.so.
arg.
Still seems like the real issue is that libidn does not degrade gracefully.
If it cant find whatever magical translation files it needs, methinks it should default to just returning whatever string it received as-is ? |
|
(0006248)
skayser (administrator)
2009-06-02 20:58
|
From looking at the mutt 1.5.19 sources the part where it bails out seems to be mutt_socket.c:470
~/tmp/mutt-1.5.19$ ack -B2 '"Bad IDN \\".*\.'
mutt_socket.c
468- if (idna_to_ascii_lz (conn->account.host, &host_idna, 1) != IDNA_SUCCESS)
469- {
470: mutt_error (_("Bad IDN \"%s\"."), conn->account.host);
...
And using the following snippet i can re-create the problem.
$ cat idna-test.c
#include <stdio.h>
#include <errno.h>
#include <locale.h>
#include <idna.h>
void main(void)
{
char *output;
int rc;
setlocale(LC_ALL,"");
rc = idna_to_ascii_lz("foo", &output, 1);
if (rc == IDNA_SUCCESS) {
printf("Converted: %s\n", output);
} else {
printf("Conversion failed: %s\n", idna_strerror(rc));
};
}
$ /opt/studio/SOS11/SUNWspro/bin/cc -o idna-test -I/opt/csw/include -L/opt/csw/lib -R /opt/csw/lib idna-test.c -lidn
$ LC_CTYPE=en_US.UTF-8 ./idna-test
Converted: foo
$ LC_CTYPE=C ./idna-test
Conversion failed: System iconv failed
Note the "System iconv failed". I didn't go further yet (nor am i near understanding the exact libidn workings), but there is a more recent libiconv version available upstream (1.13 vs. our 1.12). Phil, would you mind packaging that up for testing purposes? |
|
(0006249)
phil (reporter)
2009-06-02 21:16
|
odd.. i thought someone else had already updated it.
if you'd like to take over iconv please feel free. |
|
(0006742)
skayser (administrator)
2009-09-22 20:36
|
This has been lingering for a while and should be fixed with the updated libiconv 1.13.1,REV=2009.07.31 which has been released today.
bfr-murphy, could you please verify that it solves the problem for you. |
|
(0006747)
bfr-murphy (reporter)
2009-09-23 19:43
|
The new version of libiconv appeared at the package mirror today.
It looks like this fixes the problem i had with mutt and libiconv.
Thanks. |
|
(0006749)
skayser (administrator)
2009-09-23 19:54
|
Resolved with libiconv 1.13.1,REV=2009.07.31.
Thanks for reporting and feedback, bfr-murphy. |
|