International Language Environments Guide

Internationalized Domain Name (IDN) Support

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.

Figure 2–1 IDN to ACE Conversion

graphic shows non-English name conversion to ASCII compatible
encoded string

Figure 2–2 ACE to IDN Conversion

graphic shows ASCII compatible encoded string conversion
to non-English name

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:

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.