How to ping an IDN domain with its non-ASCII name?
From the dig
man page:
IDN SUPPORT
If dig has been built with IDN (internationalized domain name) support, it can accept and display non-ASCII domain names. dig appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the IDN_DISABLE environment variable. The IDN support is disabled if the variable is set when dig runs.
so it is supported ...
What you probably need is http://packages.ubuntu.com/saucy/idn2 It is in devel so probably not installed by default.
idn2
Internationalized domain names (IDNA2008) command line tool
Then this will work:
ping $(idn2 ąćęłńóśźż.pl)
Related videos on Youtube
moon.musick
Updated on September 18, 2022Comments
-
moon.musick over 1 year
For all I see, I cannot
ping
(ordig
) IDN domain names using their non-ASCII names, only their ASCII 'backend' withxn--
prefix. I am about to add several such names to the configuration of a DNS server I manage, apparently it works with browsers, but not with lower-level tools, which is somewhat inconvenient, as looking uppunycode
names every time I test or debug something is a major nuisance.E.g. http://ąćęłńóśźż.pl (apparently 'Hyperlink' formatting option mangles the IDN name, so not using it here on purpose) - a test page for checking if browser supports Polish IDNs - works with Firefox, but not with
ping
ordig
.Is there some way (PPA, patch, whatever) to obtain such functionality?
Using
12.04
,iputils-ping 3:20101006-1ubuntu1
anddnsutils 1:9.8.1.dfsg.P1-4ubuntu0.7
. -
moon.musick over 10 years
ping $(idn2 ąćęłńóśźż.pl)
works indeed, same fordig
. -
Rinzwind over 10 yearscan I borrow that comment? >:)
-
moon.musick over 10 yearsSure ;) Thanks, I think I'll go with this solution, it's simple enough.