Whois 和其他工具不适用于国际域名。这些名称无法正确转换为微不足道的代码。
$ whois ąćęłńóśźż.pl
Incorrect domain name: ąćęłńóśźż.pl
$ dig ąćęłńóśźż.pl
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> ąćęłńóśźż.pl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27368
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;\196\133\196\135\196\153\197\130\197\132\195\179\197\155\197\186\197\188.pl. IN A
;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Aug 05 20:02:11 CEST 2018
;; MSG SIZE rcvd: 50
$ host ąćęłńóśźż.pl
Host ąćęłńóśźż.pl not found: 3(NXDOMAIN)
$ nslookup ąćęłńóśźż.pl
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find \196\133\196\135\196\153\197\130\197\132\195\179\197\155\197\186\197\188.pl: NXDOMAIN
我很确定这些工具曾经可以正常工作。IDN 的处理方式有变化吗?
这可能是什么原因?我该如何解决?这是语言环境问题吗?
答案1
whois
对我而言在 16.04 上有效:
$ whois ąćęłńóśźż.pl
DOMAIN NAME: xn--kda9ag6e8jma6nxjsa.pl
registrant type: individual
nameservers: ns1.dnsprotect.eu.
ns2.dnsprotect.eu.
created: 2010.04.15 12:43:23
last modified: 2018.04.10 07:16:15
renewal date: 2019.04.15 12:43:23
no option
dnssec: Unsigned
REGISTRAR:
Consulting Service Sp. z o.o.
ul. Domaniewska 35A lok.1B
02-672 Warszawa
Polska/Poland
+48.221238080
[email protected]
WHOIS database responses: http://www.dns.pl/english/opiskomunikatow_en.html
WHOIS displays data with a delay not exceeding 15 minutes in relation to the .pl Registry system
Registrant data available at http://dns.pl/cgi-bin/en_whois.pl
$
至于其他三个命令,作为一种解决方法,您可以执行sudo apt-get install idn
然后使用它来进行翻译:
$ dig $(idn ąćęłńóśźż.pl)
; <<>> DiG 9.10.3-P4-Ubuntu <<>> xn--kda9ag6e8jma6nxjsa.pl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11814
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;xn--kda9ag6e8jma6nxjsa.pl. IN A
;; ANSWER SECTION:
xn--kda9ag6e8jma6nxjsa.pl. 14400 IN A 46.29.20.209
;; Query time: 273 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Sun Aug 05 20:02:51 EDT 2018
;; MSG SIZE rcvd: 70
$ host $(idn ąćęłńóśźż.pl)
xn--kda9ag6e8jma6nxjsa.pl has address 46.29.20.209
xn--kda9ag6e8jma6nxjsa.pl mail is handled by 10 mail.xn--kda9ag6e8jma6nxjsa.pl.
$ nslookup $(idn ąćęłńóśźż.pl)
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: xn--kda9ag6e8jma6nxjsa.pl
Address: 46.29.20.209
$