Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

idn_checkname (3)

Name

idn_checkname - validate an internationalized domain name

Synopsis

#include <idn/api.h>

idn_result_t
idn_checkname(idn_action_t actions, const char *from);

Description

idn_checkname(3)           Library Functions Manual           idn_checkname(3)



NAME
       idn_checkname - validate an internationalized domain name

SYNOPSIS
       #include <idn/api.h>

       idn_result_t
       idn_checkname(idn_action_t actions, const char *from);


DESCRIPTION
       The function idn_checkname() internally creates a copy of name, encodes
       it with idn_encodename() and returns its error code.

       In addition with action macros for idn_encodename() (e.g.  IDN_UNICODE-
       CONV), the following macros are available for idn_checkname().

           IDN_CHECK_REGIST
                  Encode  a domain name with IDNA2008 registration protocol to
                  validate a domain name.  Currently, its value is the same as
                  IDN_ENCODE_REGIST.

           IDN_CHECK_LOOKUP
                  Encode  a domain name with IDNA2008 lookup protocol to vali-
                  date a domain name.  Currently, its value  is  the  same  as
                  IDN_ENCODE_LOOKUP.

EXAMPLES
       The program below shows an example of idn_checkname().

           idn_result_t r;
           ...
           r = idn_checkname(IDN_CHECK_REGIST, name);
           if (r == idn_success)
               fprintf(stderr, "'%s' is valid\n", name);
           else {
               fprintf(stderr, "'%s' is not valid: %s\n",
                    name, idn_result_tostring(r));
           }
           ...


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------------------+
       |ATTRIBUTE TYPE |       ATTRIBUTE VALUE        |
       +---------------+------------------------------+
       |Availability   | library/idnkit/header-idnkit |
       +---------------+------------------------------+
       |Stability      | Committed                    |
       +---------------+------------------------------+
SEE ALSO
       idncheck(1),    libidnkit(3),    idn_encodename(3),    idn_nameinit(3),
       idn_result_tostring(3), idn.conf(5)



NOTES
       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source was downloaded from  https://jprs.co.jp/idn/idnkit-2.3.tar.bz2

       Further information about this software can be found on the open source
       community website at https://jprs.co.jp/idn.



                                 Sep 21, 2012                 idn_checkname(3)