idn_comparenames2 man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

idn_comparenames(3)					   idn_comparenames(3)

NAME
       idn_comparenames,  idn_decodename2  -  compare  two  internationzalized
       domain names

SYNOPSIS
       #include <idn/api.h>

       idn_result_t
       idn_comparenames(idn_action_t actions, const char *name1,
	   const char *name2);

       idn_result_t
       idn_comparenames2(idn_action_t actions1, const char *name1,
	   idn_action_t actions2, const char *name2);

DESCRIPTION
       The function idn_comparenames() encodes domain names name1 and name2 as
       idn_encodename() does, and then compares them.  If they are equivalent,
       it returns idn_success.	Otherwise, it returns idn_neq.	When an	 error
       occurs  in the encoding processes, the function returns the correspond‐
       ing error code (see idn_result_tostring(3) for details).

       The function idn_comparenames2() works same as idn_comparenames(),  but
       it  performs  actions1  when  it encodes name1 and it performs actions2
       when it encodes name2 respectively.

       In addition with action macros for idn_encodename() (e.g.  IDN_UNICODE‐
       CONV),  the  following  macros are available for idn_comparenames() and
       idn_comparenames2().

	   IDN_COMPARE_REGIST
		  Encode a domain name with  IDNA2008  registration  protocol,
		  before  comparison.	Currently,  its	 value	is the same as
		  IDN_ENCODE_REGIST.

	   IDN_COMPARE_LOOKUP
		  Encode a domain name with IDNA2008 lookup  protocol,	before
		  comparison.	 Currently,   its   value   is	 the  same  as
		  IDN_ENCODE_LOOKUP.

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

	   idn_result_t r;
	   ...
	   r = idn_comparenames(IDN_COMPARE_LOOKUP, name1, name2);
	   if (r == idn_success)
	       fprintf(stderr, "'%s' == '%s'\n", name1, name2);
	   else if (r == idn_neq)
	       fprintf(stderr, "'%s' != '%s'\n", name1, name2);
	   else
	       fprintf(stderr, "error: %s\n", idn_result_tostring(r));
	   ...

SEE ALSO
       idncmp(1),    libidnkit(3),     idn_encodename(3),     idn_nameinit(3),
       idn_result_tostring(3), idn.conf(5)

				 Sep 21, 2012		   idn_comparenames(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net