idncmp(1)
π¦ idncmp(1) π¦
okay bestie, welcome to the <pink>idncmp</pink> page β it lives in the General Commands Manual and it's genuinely one of the most useful little gremlins in the idnkit toolbox π
β¨ NAME β¨
idncmp β compare internationalized domain names π«Ά
πΈ SYNOPSIS πΈ
idncmp [options..] name1 name2
π DESCRIPTION π
so here's the vibe: idncmp takes name1 and name2 (both internationalized domain names), tries to convert each one to its A-label form, and then compares them. that's it. that's the whole job. iconic behavior honestly π
if they're equivalent, idncmp prints this message:
matched.
to standard error and exits with code 0 β¨
if they're different, it prints:
unmatched.
to standard error and exits with code 1 π
if name1, name2, or both of them are not valid internationalized domain names, it prints the reason (like invalid encoding) to standard error and exits with code 2 π
and if an internal error happens β memory exhaustion, for example β it prints the reason to standard error and exits with code 3 π
heads up: every result goes to standard error, not stdout. plan your scripts accordingly, bestie π
unless you pass the -noconf (or -C) option, idncmp reads a configuration file and does its conversions according to the parameters specified in that file. the default config path is /nix/store/hcyf58m2phm5bg6ch5a4lkif5fpf1lck-idnkit-2.3/etc/idn2.conf or ~/.idn2rc, or you can point it at your own file with an option πΈ
π OPTIONS π
-in in-code,-i in-codeβ set the encoding name for the domain names you're passing as arguments. the following encoding names are recognized:- any encoding names which
iconv_open()accepts PunycodeUTF-8- any alias names for the above, defined by the encoding alias file
- any encoding names which
the encoding defaults to the value of the environment variable IDN_LOCAL_CODESET or, if that isn't set, to an encoding determined from the locale information π
-conf file,-c fileβ give the path of the idnkit configuration file. if you don't specify one, the default path (/nix/store/hcyf58m2phm5bg6ch5a4lkif5fpf1lck-idnkit-2.3/etc/idn2.confor~/.idn2rc) is used β unless-noconf(or-C) is specified π-noconf,-Cβ suppress reading a configuration file. no config, no problem β¨-registration,-gβ use the domain name registration protocol.-lookup,-l(default) β use the domain name lookup protocol. this is the default behavior, so you get it for free π-nomap,-Mβ don't perform themapaction. literally the same as-skip map.-skip action,...β skip actions. the following action names are recognized:mapβ mappingsasclowerβ convert ASCII uppercase letters to lowercasertconvβ conversion from Punycode to Unicode for round trip checkprohcheckβ prohibited code point checkunascheckβ unassigned code point checknfccheckβ NFC conformance checkprefcheckβ ACE prefix checkhyphcheckβ hyphen checkcombcheckβ combining character checkctxjcheckβ CONTEXTJ code point checkctxocheckβ CONTEXTO code point check for domain name registration protocol.ctxolitecheckβ CONTEXTO code point check for domain name lookup protocol.bidicheckβ Bidi check.idnconvβ conversion to Punycodelencheckβ label length checkrtcheckβ round trip check
-localcheck file,-e fileβ also perform a local code point check using file. with the local check feature you can check whether a domain name consists of code points allowed by a particular registry. the format of file is explained inidn_setlocalcheckfile(3)π-quiet,-qβ suppress the result message; yield the exit status only. silent but deadly, love that for you π€«-test,-tβ print which language, input encoding and output encoding will be chosen if the same arguments are given to the command, and then quit immediately. (the original page saysgievnhere β we're keeping the typo, it's part of the lore π«Ά)-version,-vβ print version information and quit.-help,-hβ print help and quit.
π§ LOCAL ENCODING π§
idncmp guesses the local encoding from the locale and environment variables. for the deets, see the LOCAL ENCODING section in idn.conf(5) π
π SEE ALSO π
idncheck(1), idnconv2(1), iconv(3), idn.conf(5), idnalias.conf(5), idnlang.conf(5)
π BUGS π
the automatic input-code decision depends on your system, and sometimes it can't guess or guesses wrong. so yeah β it's way better to explicitly specify it using the -in option. no cap, just set it yourself π
Sep 21, 2012 β’ idnkit 2.3 β’ General Commands Manual β and that's the whole page, bestie. go compare some domain names, you're gonna slay π
β¨π
π¦ where this page comes from
- nixos 26.05: idnkit 2.3
- Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved
- Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
- Copyright (c) 2010-2012 Japan Registry Services Co., Ltd. All rights reserved."
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms