idncmp(1)

πŸ“¦
version 2.3 Β· 2 versions
, in nixos 26.05

πŸ¦‹ 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
    • Punycode
    • UTF-8
    • any alias names for the above, defined by the encoding alias file

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.conf or ~/.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 the map action. literally the same as -skip map.
  • -skip action,... β€” skip actions. the following action names are recognized:
    • map β€” mappings
    • asclower β€” convert ASCII uppercase letters to lowercase
    • rtconv β€” conversion from Punycode to Unicode for round trip check
    • prohcheck β€” prohibited code point check
    • unascheck β€” unassigned code point check
    • nfccheck β€” NFC conformance check
    • prefcheck β€” ACE prefix check
    • hyphcheck β€” hyphen check
    • combcheck β€” combining character check
    • ctxjcheck β€” CONTEXTJ code point check
    • ctxocheck β€” 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 Punycode
    • lencheck β€” label length check
    • rtcheck β€” 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 in idn_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 says gievn here β€” 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms