Tenders McChiken
Tenders McChiken

Reputation: 1545

An official or defacto EXAMPLE.COM for IDNs?

I'm writing unit tests and want a publicly queryable IDN that I can use in my tests. Does IANA or another body maintain an IDN equivalent to example.com? If not, is there a defacto alternative that serves the same purpose and is reliable?

I need an IDN that publicly resolves to a real IP address but it doesn't matter if the address is not publicly routable.

The closest thing I found so far are the two domains listed as IDN examples on w3.org:

Upvotes: 0

Views: 100

Answers (2)

Patrick Mevzek
Patrick Mevzek

Reputation: 12485

Does IANA or another body maintain an IDN equivalent to example.com?

Lots of IDN TLDs for use as examples on https://www.iana.org/domains/root/db (search for middle column being "test"). But they may not resolve the way you would like to.

However:

I'm writing unit tests and want a publicly queryable IDN that I can use in my tests.

To be back on programming topics, that might not be a good idea to have internal unit tests depend on external resources. What if the network is down? What if the resource is offline, temporarily or definitively? Why not really doing purely internal tests? You can have your own local domain and create IDN names in it, and then you still depend on the network but you don't depend anymore on any external resource, you control both ends.

Also, in general about IDN, if not already, I suggest a stop over at https://uasg.tech/ which should have useful resources on IDNs and testing.

Upvotes: 1

arnt
arnt

Reputation: 9675

ICANN runs some example domains that should suit you, described in UASG004 and listed as plaintext in an attachment to UASG004. They should remain reachable in the long term, so pick one or two and use it/them.

I know that one of them is a grammar error. It pains me.

I include four of them, since answers should be self-contained: համընդհանուր-ընկալում-թեստ.հայ, সর্বজনীন-স্বীকৃতির-পরীক্ষা.ভারত, универсальное-принятие-тест.москва and सार्वभौमिक-स्वीकृति-परीक्षण.संगठन. These four are good for unit tests, being easy to cut and paste, left-to-right, and fairly easy to read for those who don't know the scripts.

These domains were selected by the UASG and are kept running by ICANN, so they should be stable in the long run.

Upvotes: 2

Related Questions