![]() |
![]()
| ![]() |
![]()
NAMEidn_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, DESCRIPTIONThe 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 corresponding 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_UNICODECONV), the following macros are available for idn_comparenames() and idn_comparenames2().
EXAMPLESThe program below shows an example of idn_comparenames(). idn_result_t r; ... r = idn_comparenames(IDN_COMPARE_LOOKUP, name1, name2); if (r == idn_success) SEE ALSOidncmp(1), libidnkit(3), idn_encodename(3), idn_nameinit(3), idn_result_tostring(3), idn.conf(5)
|