retitle 363366 whois should transcode the server output
tag 363366 help upstream
thanks

On Apr 18, Loïc Minier <[EMAIL PROTECTED]> wrote:

>  gnome-nettool is a GNOME program which offers to call whois from a GUI
>  to present WHOIS queries.  However, it is hard for the program to
>  detect when whois failed processing a query because of invalid
>  parameters as the exit code is often zero.  One example is:
> 
>      whois 'google.de#' && echo true
>      No whois server is known for this kind of object.
>      true
It's debateable that this should be considered an error condition.

>  but perhaps you can suggest another way to distinguish between the
>  program's output and WHOIS data.  One of the problems in gnome-nettool
>  is that the program has to convert the output of the command to UTF-8
>  to display it in a Gtk interface, and since the data comes both from
>  the whois program itself, or from WHOIS servers, data can be mixed in
>  various encodings (such as UTF-8 and ISO-8859-1 respectively).
The correct solution is to make whois transcode the server output from
the native charset (which may be UTF-8, Latin-1 or something else: you
need to add to data.h a table with (server,encoding) tuples) to $LC_CTYPE.
I was thinking about using an iprintf() wrapper which if needed recodes
the string to be printed, but I did not have time to implement it yet.
Any help would be appreciated.

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature

Reply via email to