Internationalized Domain Name (IDN) enables the use of non-English native language names as host and domain names. To use non-English host and domain names, convert these names into ASCII Compatible Encoding (ACE) encoded names before sending the names to resolver routines as specified in RFC 3490. System administrators are also required to use ACE names in system files and applications where the system administration applications do not support the IDNs.
See RFC 3490 Internationalizing Domain Names in Applications (IDNA).
The APIs for the Internationalized Domain Name in libidnkit(3EXT) provide convenient conversions between UTF-8 or the application locale's codeset and ACE. If idn_decodename2(3EXT) is used, you can also specify an arbitrary codeset name as the codeset of the input argument.
The following table shows bilateral iconv code conversions that you can use.
Table 2–16 iconv Code Conversions
From Code |
To Code |
---|---|
ACE ACE-ALLOW-UNASSIGNED |
UTF-8 UTF-8 |
UTF-8 UTF-8 |
ACE ACE-ALLOW-UNASSIGNED |
The ACE and the ACE-ALLOW-UNASSIGNED iconv code conversion names have the following meanings:
ACE.
ACE is a fromcode or tocode name that can be used in iconv code conversions to refer to the ASCII Compatible Encoding defined in RFC 3490. This conversion uses STD3 ASCII rules. Unassigned characters are not allowed. ACE is typically used for storing or giving host or domain names to machines.
ACE-ALLOW-UNASSIGNED.
ACE-ALLOW-UNASSIGNED performs the same operations as ACE except that ACE-ALLOW-UNASSIGNED allows unassigned characters. ACE-ALLOW-UNASSIGNED is typically used for query purpose.
The following example shows a conversion from ACE to UTF-8 with input from the hostnames.txt file. Output goes to standard output.
system% iconv -f ACE -t UTF-8 hostnames.txt
The dedicated IDN conversion utility idnconv(1) provides IDN conversions with various options. The options control the conversion details.
For information about IDN, the conversion routines, and iconv code conversions, see libidnkit(3LIB), idn_decodename(3EXT), idn_decodename2(3EXT), idn_encodename(3EXT), and iconv_en_US.UTF-8(5) man pages.