2003.08.13 (水) 14:33:37 <u*j*2*6*> whois.nic.or.krの結果を表示するときは文字セットをハングルにします
2003.08.13 (水) 14:35:32 <u*j*2*6*> あと、if文をまとめたので少しだけ速くなりました

shuusei24185:IPWhoisでwhois.v6nic.netとwhois.nic.or.krに対応(24129,24182参照)

diff --dos -ur 24184/browseform.pas 24185/browseform.pas
--- 24184/browseform.pas	Mon Aug 11 21:41:56 2003
+++ 24185/browseform.pas	Wed Aug 13 13:58:30 2003
@@ -548,36 +548,38 @@
   i,j: Integer;
   str: String;
 begin
-  //以下のリストはwp.cgiをもとにしてます
-  if pos('LACNIC',whoisinfo)>0                then nextserver:='whois.lacnic.net';
-  if pos('APNIC',whoisinfo)>0                 then nextserver:='whois.apnic.net';
-  if pos('APNIC-',whoisinfo)>0                then nextserver:='whois.apnic.net';
-  if pos('AUNIC-AU',whoisinfo)>0              then nextserver:='whois.aunic.net';
-  if pos('NETBLK-RIPE',whoisinfo)>0           then nextserver:='whois.ripe.net';
-  if (pos('NETBLK-',whoisinfo)>0) and
-     (pos('-RIPE',whoisinfo)>0)               then nextserver:='whois.ripe.net';
-  if pos('NET-RIPE',whoisinfo)>0              then nextserver:='whois.ripe.net';
-  if pos('-RIPE',whoisinfo)>0                 then nextserver:='whois.ripe.net';
-  if pos('RIPE-',whoisinfo)>0                 then nextserver:='whois.ripe.net';
-  if pos('NETBLK-BRAZIL',whoisinfo)>0         then nextserver:='whois.nic.br';
-  if pos('whois.nic.ad.jp',whoisinfo)>0       then nextserver:='whois.nic.ad.jp';
-  if pos('whois.telstra',whoisinfo)>0         then nextserver:='whois.telstra.net';
-  if pos('rwhois.exodus',whoisinfo)>0         then nextserver:='rwhois.exodus.net';
-  if pos('rwhois.verio',whoisinfo)>0          then nextserver:='rwhois.verio.net';
-  if pos('rwhois.dnai',whoisinfo)>0           then nextserver:='rwhois.dnai.com';
-  if pos('rwhois.digex',whoisinfo)>0          then nextserver:='rwhois.digex.net';
-  if pos('rwhois.internex',whoisinfo)>0       then nextserver:='rwhois.internex.net';
-  if pos('rwhois.concentric',whoisinfo)>0     then nextserver:='rwhois.concentric.net';
+  //以下のリストの大部分はwp.cgiをもとにしてます
+       if pos('whois.v6nic.net',whoisinfo)>0   then nextserver:='whois.v6nic.net'
+  else if pos('whois.nic.or.kr',whoisinfo)>0   then nextserver:='whois.nic.or.kr'
+  else if pos('KRNIC',str)>0                   then nextserver:='whois.nic.or.kr'
+  else if pos('JNIC',whoisinfo)>0              then nextserver:='whois.nic.ad.jp'
+  else if pos('JPNIC',whoisinfo)>0             then nextserver:='whois.nic.ad.jp'
+  else if pos('rwhois.beanfield',whoisinfo)>0  then nextserver:='rwhois.beanfield.net'
+  else if pos('rwhois.cogentco',whoisinfo)>0   then nextserver:='rwhois.cogentco.com'
+  else if pos('rwhois.cais',whoisinfo)>0       then nextserver:='rwhois.cais.net'
+  else if pos('rwhois.elan',whoisinfo)>0       then nextserver:='rwhois.elan.net'
+  else if pos('rwhois.oar',whoisinfo)>0        then nextserver:='rwhois.oar.net'
   // rwhois.eni.net is currently broken
-  //if pos('rwhois.eni',whoisinfo)>0            then nextserver:='rwhois.eni.net';
-  if pos('rwhois.oar',whoisinfo)>0            then nextserver:='rwhois.oar.net';
-  if pos('rwhois.elan',whoisinfo)>0           then nextserver:='rwhois.elan.net';
-  if pos('rwhois.cais',whoisinfo)>0           then nextserver:='rwhois.cais.net';
-  if pos('rwhois.cogentco',whoisinfo)>0       then nextserver:='rwhois.cogentco.com';
-  if pos('rwhois.beanfield',whoisinfo)>0      then nextserver:='rwhois.beanfield.net';
-  if pos('JPNIC',whoisinfo)>0                 then nextserver:='whois.nic.ad.jp';
-  if pos('JNIC',whoisinfo)>0                  then nextserver:='whois.nic.ad.jp';
-  if pos('whois.nic.or.kr',whoisinfo)>0       then nextserver:='whois.nic.or.kr';
+  //else if pos('rwhois.eni',whoisinfo)>0        then nextserver:='rwhois.eni.net'
+  else if pos('rwhois.concentric',whoisinfo)>0 then nextserver:='rwhois.concentric.net'
+  else if pos('rwhois.internex',whoisinfo)>0   then nextserver:='rwhois.internex.net'
+  else if pos('rwhois.digex',whoisinfo)>0      then nextserver:='rwhois.digex.net'
+  else if pos('rwhois.dnai',whoisinfo)>0       then nextserver:='rwhois.dnai.com'
+  else if pos('rwhois.verio',whoisinfo)>0      then nextserver:='rwhois.verio.net'
+  else if pos('rwhois.exodus',whoisinfo)>0     then nextserver:='rwhois.exodus.net'
+  else if pos('whois.telstra',whoisinfo)>0     then nextserver:='whois.telstra.net'
+  else if pos('whois.nic.ad.jp',whoisinfo)>0   then nextserver:='whois.nic.ad.jp'
+  else if pos('NETBLK-BRAZIL',whoisinfo)>0     then nextserver:='whois.nic.br'
+  else if pos('RIPE-',whoisinfo)>0             then nextserver:='whois.ripe.net'
+  else if pos('-RIPE',whoisinfo)>0             then nextserver:='whois.ripe.net'
+  else if pos('NET-RIPE',whoisinfo)>0          then nextserver:='whois.ripe.net'
+  else if (pos('NETBLK-',whoisinfo)>0) and
+     (pos('-RIPE',whoisinfo)>0)                then nextserver:='whois.ripe.net'
+  else if pos('NETBLK-RIPE',whoisinfo)>0       then nextserver:='whois.ripe.net'
+  else if pos('AUNIC-AU',whoisinfo)>0          then nextserver:='whois.aunic.net'
+  else if pos('APNIC-',whoisinfo)>0            then nextserver:='whois.apnic.net'
+  else if pos('APNIC',whoisinfo)>0             then nextserver:='whois.apnic.net'
+  else if pos('LACNIC',whoisinfo)>0            then nextserver:='whois.lacnic.net';
 
   if pos('(NET-',whoisinfo)>0 then
     if Pos('NET-',nextstr)=1 then
@@ -597,16 +599,25 @@
     TryWhois;
   end
   else
+  with edit_whois_result do
   begin
-    edit_whois_result.Lines.Add(FormatResult(whoisinfo));
+    Lines.Add(FormatResult(whoisinfo));
     if (nextstr<>decode_ip(ip)) and (nextstr<>'') then TryWhois;
-    with edit_whois_result do
+    if nextserver='whois.nic.or.kr' then
+    begin
+      Self.Caption:=Self.Caption+' Country: KR';
+      Font.Charset:=HANGEUL_CHARSET;
+    end
+    else
+    begin
       for i:=0 to Lines.Count-1 do
         if pos('country',Lowercase(Lines[i]))=1 then
         begin
           Self.Caption:=Self.Caption+' Country: '+Copy(Lines[i],Length(Lines[i])-1,2);
           break;
         end;
+      Font.Charset:=SHIFTJIS_CHARSET;
+    end;
   end;
 end;
 
diff --dos -ur 24184/constants.pas 24185/constants.pas
--- 24184/constants.pas	Mon Aug 11 21:49:56 2003
+++ 24185/constants.pas	Wed Aug 13 14:24:42 2003
@@ -27,8 +27,8 @@
  SLAVANAP_VERSION             = '2.4.1';
  SLAVANAP_BUILD               = '108';
  SLAVANAP_BUILD_DATE          = '24 January 2003';
- SLAVANAP_SHUUSEI             = '84';
- SLAVANAP_SHUUSEI_DATE        = '11 August 2003';
+ SLAVANAP_SHUUSEI             = '85';
+ SLAVANAP_SHUUSEI_DATE        = '13 August 2003';
  SLAVANAP_VERSION_SHORT       = SLAVANAP_TITLE+' '+SLAVANAP_VERSION;
  SLAVANAP_FULL                = SLAVANAP_TITLE+' '+SLAVANAP_VERSION+
                                 ' (build '+SLAVANAP_BUILD+