MAN page from openSUSE Tumbleweed idnkit-1.0-262.1.x86_64.rpm
Section: File Formats (5)
Updated: Mar 8, 2002Index
idn.conf, .idnrc, idnalias.conf - configuration files for idnkit library
are configuration files for idnkitlibrary which is a toolkit for handling internationalized domain names.
idnkit library tries to load the user's configuration file ~/.idnrcfirst, and then tries the system configutation file /etc/idn.conf.Note that idnkit library loads either, not both.
To use internationalized domain names in DNS or other protocols, theymust be converted to an appropriate format before further processing.In idnkit, this conversion process is comprised of the following tasks.
- Convert the given domain name in application's local codeset to Unicode,and vice versa.
- Map certain characters in the name to period character so that they aretreated as the domain namedelimiter (delimiter mapping).
- Map certain characters in the name to other characters or chracter sequences,according to a mapping rule determined by its top level domain (TLD).
- Perform NAMEPREP, which is a starndard name preparation process forinternationalized domain names. This process is composed ofthe tree steps called mapping, normalization, prohibited characterchecking and bidirectional string checking.
- Convert the nameprepped name to IDN encoding, which is the standard encodingfor internationalized domain names (also known as ASCII-compatible encoding,ACE), and vice versa.
The configuration file specifies the parameters for these tasks, such as:
- the encoding of internationalized domain names (IDN encoding).
- NAMEPREP schemes.
The configuration file is a simple text files, and each line in the file(other than comment lines, which begin with ``#'', and empty lines)forms an entry of the following format:
IDN encoding entry specifies the encoding name (codeset name) whichis used as the encoding of internationalized domain names.
The syntax of this entry is:
encoding is the encoding name to be used, and any of the followingnames can be specified.
- Codeset names which iconv_open() library function accepts. Pleaseconsult iconv() documentation for the available codesets.
- Any alias names for the above, defined by the alias file.(See section ``ENCODING-ALIAS-FILE'')
The standard encoding was determined as Punycode.
Nameprep entry specifies the version of NAMEPREP, which is a specificationof ``canonicalization'' process of internationalized domain name beforeit is converted to the IDN encoding.
The syntax of this entry is:
version is the version name of NAMEPREP specification, and currentlythe following versions can be specified.
This version refers to RFC3491 ``rfc-3491.txt''.
The NAMEPREP process consists of the following 4 subprocesses.
- mapping, which maps certain characters in a name to other characters,possibly none.
- normalization, which replaces character variants in a name toa unique one.
- prohibited character checking, which detects invalid characters in a name.
- unassigned codepoint checking, which also invalid codepoints in a name.
- bidirectional string checking, which detecs invalid string.
This entry specifies localized mapping phase before NAMEPREP takes place.Different mapping rules can be specified for each TLD (top-level domain).For example, you can have one mapping for ``.tw'' domain, and another for``.jp'' domain.
The syntax of this entry is:
local-map tld scheme [scheme..]
tld specifies the TLD to which the mapping rule is to be applied,and scheme specifies the mapping scheme, and currently availableschemes are:
- Specify mapping defined by RFC3491.
- Specify mapping defined by the file pathname.See ``MAPFILE FORMAT'' for the format of this file.
There are two special tlds for specifying the mapping rule forlocal domain names (domain names without any dots in them), and thedefault mapping rule.Iftld is ``-'', it matches domain names which do not contain anydots.If tld is ``.'', it matches any domain names which don't matchto any other mapping rules specified by ``local-map'' entries.
A mapfile defines a set of character mapping rules. It can defineunconditional one-character to N-character-sequence (N can be 0, 1 or more)mappings.
A mapfile is a simple text file, and each line specifies a single mapping.Each line is of the form:
src-codepoint indicates source character of the mapping, and mustbe a Unicode codepoint value in hexadecimal string.mapped-codepoint-seq is a sequence of characters which is theoutcome of the mapping, and must be a (possibly empty) list of Unicodecodepoint values in hexadecimal string, separated by spaces.
Lines which begin with ``#'' are treated as comments and ignored.
A sample mapfile is shown below.
# map "A" to "a"0041; 0061;# map "#" to nothing0023; ;# map "@" to "at"0040; 0061 0074;
doesn't have an entry to specify thelocal codeset, since it is determined from the application's currentlocale information.So each application can use different local codeset.
Although idnkit tries hard to find out the local codeset, sometimes itfails. For example, there are applications which use non-ASCII codesetbut work in C locale. In this case, you can specify the application'slocal codeset by an environment variable ``IDN_LOCAL_CODESET''.Just set the codeset name (or its alias name) to the variable, andidnkit will use the codeset as the local one, regardless of the localesetting.
Encoding alias file specifies codeset name aliases. It is located on/etc/idnalias.conf and always loaded automatically as idn.confand .idnrc. The aliases in this file can be used just as the real names.
The alias file is a simple text file, consisting of lines of the form:
alias-name is the alias name to be defined, and name isthe real name or another alias name.
The following shows a sample configuration file.
## a sample configuration.## Use Punycode as the IDN encoding.idn-encoding Punycode# Use RFC3491 as NAMEPREP.nameprep RFC3491# Perform Japanese-specific mapping for .jp domain.# assuming /usr/local/lib/idnkit/jp-map contains the mapping.local-map .jp filemap:/usr/local/lib/idnkit/jp-map
- sample configuration with comments/etc/idnalias.conf.sample
- sample alias file
- IDN-ENCODING ENTRY
- NAMEPREP ENTRY
- LOCAL-MAP ENTRY
- MAPFILE FORMAT
- LOCAL CODESET
- SAMPLE CONFIGURATION
- SEE ALSO
This document was created byman2html,using the manual pages.