logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tcl::idna - Support for normalization of Internationalized Domain Names

Description

       This  package  provides  an implementation of the punycode scheme used in Internationalised Domain Names,
       and some access commands. (See RFC 3492 for a description of punycode.)

       tcl::idnadecodehostname
              This command takes the name  of  a  host  that  potentially  contains  punycode-encoded  character
              sequences,  hostname,  and returns the hostname as might be displayed to the user. Note that there
              are often UNICODE characters that have extremely similar glyphs, so  care  should  be  taken  with
              displaying hostnames to users.

       tcl::idnaencodehostname
              This command takes the name of a host as might be displayed to the user, hostname, and returns the
              version of the hostname with characters not permitted in basic hostnames encoded with punycode.

       tcl::idnapunysubcommand...
              This  command  provides  direct  access to the basic punycode encoder and decoder. It supports two
              subcommands:

              tcl::idnapunydecodestring ?case?
                     This command decodes the punycode-encoded string, string, and returns the result.  If  case
                     is  provided, it is a boolean to make the case be folded to upper case (if case is true) or
                     lower  case  (if  case  is  false)  during  the  decoding  process;  if  omitted,  no  case
                     transformation is applied.

              tcl::idnapunyencodestring ?case?
                     This  command  encodes  the string, string, and returns the punycode-encoded version of the
                     string. If case is provided, it is a boolean to make the case be folded to upper  case  (if
                     case  is true) or lower case (if case is false) during the encoding process; if omitted, no
                     case transformation is applied.

       tcl::idnaversion
              This returns the version of the tcl::idna package.

Example

       This is an example of how punycoding of a string works:

              package require tcl::idna

              puts [tcl::idnapunyencode "abc→def"]
              #    prints: abcdef-kn2c
              puts [tcl::idnapunydecode "abcdef-kn2c"]
              #    prints: abc→def

Keywords

       internet, www

http                                                   0.1                                            idna(3tcl)

Name

       tcl::idna - Support for normalization of Internationalized Domain Names

See Also

http(3tcl), cookiejar(3tcl)

Synopsis

       package require tcl::idna 1.0

       tcl::idnadecodehostnametcl::idnaencodehostnametcl::idnapunydecodestring ?case?
       tcl::idnapunyencodestring ?case?
       tcl::idnaversion
________________________________________________________________________________________________________________

See Also