idna(3tcl)

πŸ“¦
version 9.0.4 Β· 2 versions
, in ubuntu stonking

πŸ’– idna(3tcl) πŸ’–

okay bestie, listen up β€” this is the manual page for tcl::idna, and it comes from Tcl Bundled Packages. we're doing Internationalized Domain Names today and honestly? iconic behavior. let's get into it πŸ¦‹


✨ NAME ✨

tcl::idna β€” Support for normalization of Internationalized Domain Names 🌸


πŸŽ€ SYNOPSIS πŸŽ€

package require tcl::idna 1.0

tcl::idna decode hostname
tcl::idna encode hostname
tcl::idna puny decode string ?case?
tcl::idna puny encode string ?case?
tcl::idna version

πŸ’… DESCRIPTION πŸ’…

okay so this package is literally giving us an implementation of the punycode scheme that's used in Internationalised Domain Names, plus some access commands. (See RFC 3492 for a description of punycode β€” that's the homework if you want the deep lore πŸ“š)

  • tcl::idna decode hostname β€” this one takes the name of a host that potentially contains punycode-encoded character sequences, that's hostname, and returns the hostname as it might be displayed to the user. but bestie, huge warning: there are often UNICODE characters with extremely similar glyphs (looking at you, sneaky lookalikes πŸ‘€), so be careful when you're displaying hostnames to users. it's giving "trust no one" energy.
  • tcl::idna encode hostname β€” takes the name of a host as it might be displayed to the user, hostname, and returns the version of the hostname where characters that aren't permitted in basic hostnames get encoded with punycode. slay ✨
  • tcl::idna puny subcommand ... β€” direct access to the basic punycode encoder and decoder. it supports two subcommands:
    • tcl::idna puny decode string ?case? β€” decodes the punycode-encoded string and returns the result. if case is provided, it's a boolean that folds the case to upper case (if case is true) or lower case (if case is false) during the decoding process. if it's omitted, no case transformation happens. periodt.
    • tcl::idna puny encode string ?case? β€” encodes the string and returns the punycode-encoded version of it. if case is provided, it's a boolean that folds the case to upper case (if case is true) or lower case (if case is false) during the encoding process. if it's omitted, no case transformation happens. no cap. 🫢
  • tcl::idna version β€” returns the version of the tcl::idna package. short, sweet, iconic. πŸ‘‘

🌈 EXAMPLE 🌈

here's an example of how punycoding of a string works β€” it's literally so satisfying, watch this:

package require tcl::idna

puts [tcl::idna puny encode "abc→def"]
#    prints: abcdef-kn2c
puts [tcl::idna puny decode "abcdef-kn2c"]
#    prints: abc→def

ate and left no crumbs πŸ’…βœ¨


πŸ‘€ SEE ALSO πŸ‘€

go read those too, bestie, knowledge is power πŸ’œ


πŸ”₯ KEYWORDS πŸ”₯

  • internet
  • www

and that's the whole vibe! this page is brought to you by the http package, version 0.1. mwah, stay punycode-pilled πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from