Package: lbdb
Version: 0.36
Severity: normal
Tags: patch

Hi,

lbdb-fetchaddr uses latin9 as default charset, unless another one is 
given on the commandline. While I agree that using a unibyte charset is 
the only sane default when no precise information about the system is 
available, I think fetchaddr should respect locale environment variables 
as do most other sensible programs.

I suppose most users use UTF-8 like me, and for those the current 
behaviour is just broken and forces them to look for a workaround (in 
this case searching the lbdb-fetchaddr manpage for the charset 
commandline option which is not so obvious I think).

>From what I read up in a few minutes, a simple change like: >

28a29,30
> #include <locale.h>
> #include <langinfo.h>
125a128,132
> #ifdef HAVE_ICONV
>   /* set locale so as to enable a query for the preferred db file 
>   encoding */
>   setlocale (LC_ALL, "");
>   *charsetptr = nl_langinfo (CODESET);
> #endif

to fetchaddr.c should to it (it works for me, but could perhaps need 
some beautification like tests for locale headers or so).

Kind regards,
Jens Stimpfle

PS: I've removed the System Information reportbug initially created 
below, because I tested the above on a squeeze system, but can't get 
reportbug to use non-standard sendmail there, and this here is a lenny 
system... I hope this isn't a problem -- I am not so much in the 
bug-tracking netiquette.



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to