How to ping an IDN domain with its non-ASCII name?

5,506

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)
Share:
5,506

Related videos on Youtube

moon.musick
Author by

moon.musick

Updated on September 18, 2022

Comments

  • moon.musick
    moon.musick over 1 year

    For all I see, I cannot ping (or dig) IDN domain names using their non-ASCII names, only their ASCII 'backend' with xn-- 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 up punycode 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 or dig.

    Is there some way (PPA, patch, whatever) to obtain such functionality?

    Using 12.04, iputils-ping 3:20101006-1ubuntu1 and dnsutils 1:9.8.1.dfsg.P1-4ubuntu0.7.

  • moon.musick
    moon.musick over 10 years
    ping $(idn2 ąćęłńóśźż.pl) works indeed, same for dig.
  • Rinzwind
    Rinzwind over 10 years
    can I borrow that comment? >:)
  • moon.musick
    moon.musick over 10 years
    Sure ;) Thanks, I think I'll go with this solution, it's simple enough.