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 5890. System administrators are also required to use ACE names in system files and applications where the system administration applications do not support the IDNs.
For more information, see Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework, RFC 5890.
Figure 1 Example of IDN in Firefox
Oracle Solaris 11 provides two sets of IDN implementations, including libraries and associated utilities: the GNU IDN library and the JPRS (Japan Registry Services co., Ltd.) idnkit-2 library. Some applications might also have their own IDN implementation. For example, Firefox and Thunderbird have their own IDN service in the networking protocol component called Necko.
GNU-libidn is a GNU project, licensed with the GNU Lesser General Public License (LGPL) Version 2.1 or later. GNU-libidn is widely adopted by various GNU/Linux distributions. Therefore, Desktop and GNOME applications such as pidgin usually leverage GNU-libidn for IDN support.
idn(1) is the command line interface to the internationalized domain name library. The following example converts the host name in UTF-8 into ACE encoding. The resulting URL http://xn-fsqu00a.xn--0zwm56d can then be used as ACE-encoded equivalent of http://例子.测试.
$ idn --quiet -a 例子.测试 xn-fsqu00a.xn-0zwm56d
GNU-libidn is available for installation as the library/libidn package. For more information about options, see the idn (1) man page.
The idnkit-2 library is an open-source IDN implementation with idnkit-2 JPRS Public License. The dedicated idnkit-2 conversion utility idnconv(1) provides IDN conversions with various options. For more information on the options to control the conversion details, see the idnconv(1) man page.
Oracle Solaris 11 also supports IDN conversions through the iconv(3C) interface by leveraging the conversion routines in libidnkit(3). The iconv(1) utility can also be used for the conversions between ACE and UTF-8, as shown in following table.
Since the IDNA2008 explicitly defines terminologies for two operational modes, lookup and registration, Oracle Solaris supplies corresponding iconv code conversion name aliases, IDNA2008-LOOKUP (an alias to ACE-ALLOW-UNASSIGNED) and IDNA2008-REGIST (an alias to ACE).
The ACE and the ACE-ALLOW-UNASSIGNED iconv code conversion names (and their aliases) have the following meanings:
ACE or IDNA2008-REGIST
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 5890. This conversion uses STD3 ASCII rules. Unassigned characters are not allowed. ACE is typically used for storing or giving host or domain names to systems.
ACE-ALLOW-UNASSIGNED or IDNA2008-LOOKUP
ACE-ALLOW-UNASSIGNED performs the same operations as ACE except that ACE-ALLOW-UNASSIGNED allows unassigned characters. ACE-ALLOW-UNASSIGNED is typically used for queries.
The following example shows a conversion from ACE to UTF-8 with input from the hostnames.txt file. Output goes to standard output.
$ iconv -f ACE -t UTF-8 hostnames.txt
For information about the idnkit-2 library and iconv code conversions, see the libidnkit(3) and iconv(5) man pages.