GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
idn_checkname(3) FreeBSD Library Functions Manual idn_checkname(3)

idn_checkname - validate an internationalized domain name

#include <idn/api.h>
idn_result_t
idn_checkname(idn_action_t actions, const char *from);

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_UNICODECONV), 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 validate a domain name. Currently, its value is the same as IDN_ENCODE_LOOKUP.

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));
}
...

idncheck(1), libidnkit(3), idn_encodename(3), idn_nameinit(3), idn_result_tostring(3), idn.conf(5)
September 21, 2012

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.