Bug 132362

Summary: [PATCH] Add charset recoding support
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: jwhoisAssignee: Miloslav Trmač <mitr>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: db
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.denic.de/en/domains/technik/denic_whois-server/index.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-20 13:35:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
jwhois-3.2.2-denic.patch
none
Output character set conversion none

Description Robert Scheck 2004-09-11 17:24:12 UTC
Description of problem:
jwhois doesn't query .de domains correctly since March 1st, 2004,
where IDN support was enabled by DENIC. To get the same information
before March 1st, 2004, further query parameters have to be used.

Version-Release number of selected component (if applicable):
jwhois-3.2.2-4

How reproducible:
Everytime, see below.

Steps to Reproduce:
--- snipp ---
# whois denic.de
[Querying whois.denic.de]
[whois.denic.de]
domain:      denic.de
status:      connect
--- snapp ---
  
Actual results / Expected results:
Apply of the attached patch, that all relevant information like 
reg-c, admin-c, tech-c and zone-c are shown again at .de domain 
queries/answers.

When this patch is applied, FC 1/2 also should get an update of 
jwhois.

Additional info:
This change also solves the IDN support problem for .de domains 
temporarly more or less, what NOT means, that bug #117706 can be 
closed, because every registry has another query and answer 
behaviour...

Comment 1 Robert Scheck 2004-09-11 17:26:54 UTC
Created attachment 103724 [details]
jwhois-3.2.2-denic.patch

BTW, it isn't possible to send this patch upstream currently, because it will
be refused, the jwhois guys will not include a fixed charset in their
configuration file. At Red Hat/Fedora Core this is possible, because UTF-8 is
the default charset for a long time already.

Comment 2 Miloslav Trmač 2004-09-11 18:21:07 UTC
This is definitely an improvement, should be in FC3.

There actually two different issues now:
* IDN support on input; should be solved within 117706
* recoding of output from whois
  While UTF-8 is the default character set, we still should be able
  to support users in other environments.
  ("If this is not good enough for upstream, why is it good enough
  for Fedora?")
  I'll look at implementing the recoding.

Comment 3 Robert Scheck 2004-09-11 22:43:19 UTC
Miloslav, I didn't want to say, that Fedora should use the stuff, 
that isn't good enough for upstream, but I run several times in the 
past against the Red Hat, Inc. wall, that non UTF-8 specific stuff 
isn't relevant any longer (for example the man pages are delivered 
mostly as possible only in UTF-8). So my thinking was, if Fedora 
exclusivly want to use UTF-8, it shouldn't be a problem - maybe you 
think in another way about it...

Another point is, that IDN itself is a problem, because there's no 
standard how the local registries have to handle it. The swiss 
registry currently seems to return the whois information with the 
ISO-8859-1(5) charset for example.

The best way would be (in my eyes) to get the local charset from 
input, convert it to IDN (ace), forward it to the corresponding whois 
server, get the results, convert them from whatever to the local 
charset again - but I think that would be a bigger change at jwhois?!

Comment 4 Miloslav Trmač 2004-09-11 23:14:25 UTC
(man pages actually seem to display fine in non-UTF-8 locales for me,
but that's not important.)

I agree with your analysis - that's what I inteded to describe
with comment 2.

At this point I am determined to ship the config change,
I'll maybe only submit output charset conversion upstream.

Comment 5 Miloslav Trmač 2004-09-12 00:43:24 UTC
Created attachment 103743 [details]
Output character set conversion

Comment 6 Robert Scheck 2004-09-12 11:02:53 UTC
Hey, your output character conversion works fine :) I only added:

--- snipp ---
--- /etc/jwhois.conf.new   2004-09-12 12:58:48.000000000 +0200
+++ /etc/jwhois.conf       2004-09-12 12:52:00.000000000 +0200
@@ -727,6 +727,10 @@
        "whois\\.denic\\.de" {
                answer-charset = "UTF-8";
        }
+
+       "whois\\.nic\\.ch" {
+               answer-charset = "ISO-8859-15";
+       }
 }

 #
--- snapp ---

to make the localised output from the Swiss registry with umlauts 
also with the correct local charset readable. Another registry using
localised characters I didn't find, yet.

If my IDN hack would be cleanly rewritten (by someone, who's c code
is better than mine) merged to the code, jwhois would be the perfect 
whois client ;-)

Comment 7 Miloslav Trmač 2004-09-13 16:30:10 UTC
jwhois-3.2.2-5 contains the patch from comment 1, it will
show up in rawhide after FC3t2.
I'm keeping the bug open to track upstream acceptance of
the charset conversion patch.

Thanks.

Comment 8 Robert Scheck 2004-09-13 16:35:34 UTC
Did you also merge in my change from comment #6 for the Swiss registry?

Comment 9 Miloslav Trmač 2004-09-13 16:41:29 UTC
No, it does nothing when the answer-charset support is not there yet.

Comment 10 Robert Scheck 2004-11-07 11:35:44 UTC
Any news? Miloslav did you get any response by upstream for your 
jwhois patch, yet?

Comment 11 Miloslav Trmač 2004-11-07 11:41:00 UTC
None :(
I'll try to contact the upstream maintainer again.

Comment 12 Robert Scheck 2005-02-23 12:59:53 UTC
*Bruah* the current latest official jwhois CVS solution for querying .de domains
is imho the badest possible solution! We _always_ should prefer a whois server 
rather a website dump. Otherwise we wouldn't need a whois server...

Comment 13 Miloslav Trmač 2005-08-01 01:18:26 UTC
*** Bug 164748 has been marked as a duplicate of this bug. ***

Comment 14 Robert Scheck 2006-03-26 00:53:22 UTC
Just asking for the current status of the patch...

Comment 15 Miloslav Trmač 2006-03-26 19:16:02 UTC
No reply since sending it upstream, updated for 3.2.3, on Sep 1 :(

I have resent it now, thanks for the reminder.

Comment 16 Robert Scheck 2006-05-20 13:35:27 UTC
Your patch was accepted by upstream today, from ChangeLog:

        * Added patch to support conversion of whois server output to
        local charset. Fixes Fedora Core bug #132362 (Miloslav Trmac)

The Swiss registry changed the answer charset to UTF-8 in the meantime, but
I'll submit a small patch for fixing this and for the answer charset of the 
Principality of Liechtenstein.

As your patch got part of upstream, I'll close this bug report now.