1 .\" Id: idn.conf.5.in,v 1.1 2003/06/04 00:27:16 marka Exp "
3 .\" Copyright (c) 2000,2001 Japan Network Information Center.
4 .\" All rights reserved.
6 .\" By using this file, you agree to the terms and conditions set forth bellow.
8 .\" LICENSE TERMS AND CONDITIONS
10 .\" The following License Terms and Conditions apply, unless a different
11 .\" license is obtained from Japan Network Information Center ("JPNIC"),
12 .\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
13 .\" Chiyoda-ku, Tokyo 101-0047, Japan.
15 .\" 1. Use, Modification and Redistribution (including distribution of any
16 .\" modified or derived work) in source and/or binary forms is permitted
17 .\" under this License Terms and Conditions.
19 .\" 2. Redistribution of source code must retain the copyright notices as they
20 .\" appear in each source code file, this License Terms and Conditions.
22 .\" 3. Redistribution in binary form must reproduce the Copyright Notice,
23 .\" this License Terms and Conditions, in the documentation and/or other
24 .\" materials provided with the distribution. For the purposes of binary
25 .\" distribution the "Copyright Notice" refers to the following language:
26 .\" "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
28 .\" 4. The name of JPNIC may not be used to endorse or promote products
29 .\" derived from this Software without specific prior written approval of
32 .\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
33 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
35 .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
36 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
39 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
41 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
42 .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
44 .TH idn.conf 5 "Mar 8, 2002"
47 idn.conf, .idnrc, idnalias.conf \- configuration files for idnkit library
54 @sysconfdir@/idnalias.conf
57 \fBidn.conf\fR and \fB.idnrc\fR are configuration files for idnkit
58 library which is a toolkit for handling internationalized domain names.
60 idnkit library tries to load the user's configuration file ~/.idnrc
61 first, and then tries the system configutation file
62 @sysconfdir@/idn.conf.
63 Note that idnkit library loads either, not both.
65 To use internationalized domain names in DNS or other protocols, they
66 must be converted to an appropriate format before further processing.
67 In idnkit, this conversion process is comprised of the following tasks.
69 Convert the given domain name in application's local codeset to Unicode,
72 Map certain characters in the name to period character so that they are
73 treated as the domain name
74 delimiter (\fIdelimiter mapping\fR).
76 Map certain characters in the name to other characters or chracter sequences,
77 according to a mapping rule determined by its top level domain (TLD).
79 Perform NAMEPREP, which is a starndard name preparation process for
80 internationalized domain names. This process is composed of
81 the tree steps called mapping, normalization, prohibited character
82 checking and bidirectional string checking.
84 Convert the nameprepped name to IDN encoding, which is the standard encoding
85 for internationalized domain names (also known as ASCII-compatible encoding,
88 The configuration file specifies the parameters for these tasks, such as:
91 the encoding of internationalized domain names (IDN encoding).
97 The configuration file is a simple text files, and each line in the file
98 (other than comment lines, which begin with ``#'', and empty lines)
99 forms an entry of the following format:
103 \fIkeyword\fP\ \fIvalue..\fP
107 .SH "IDN-ENCODING ENTRY"
108 IDN encoding entry specifies the encoding name (codeset name) which
109 is used as the encoding of internationalized domain names.
111 The syntax of this entry is:
115 \f(CWidn-encoding \fP\fIencoding\fP
119 \fIencoding\fP is the encoding name to be used, and any of the following
120 names can be specified.
127 Codeset names which iconv_open() library function accepts. Please
128 consult iconv() documentation for the available codesets.
130 Any alias names for the above, defined by the alias file.
131 (See section ``ENCODING-ALIAS-FILE'')
134 The standard encoding was determined as Punycode.
137 Nameprep entry specifies the version of NAMEPREP, which is a specification
138 of ``canonicalization'' process of internationalized domain name before
139 it is converted to the IDN encoding.
141 The syntax of this entry is:
145 \f(CWnameprep \fP\fIversion\fP
149 \fIversion\fR is the version name of NAMEPREP specification, and currently
150 the following versions can be specified.
155 This version refers to RFC3491 ``rfc-3491.txt''.
158 The NAMEPREP process consists of the following 4 subprocesses.
160 mapping, which maps certain characters in a name to other characters,
163 normalization, which replaces character variants in a name to
166 prohibited character checking, which detects invalid characters in a name.
168 unassigned codepoint checking, which also invalid codepoints in a name.
170 bidirectional string checking, which detecs invalid string.
172 .SH "LOCAL-MAP ENTRY"
173 This entry specifies localized mapping phase before NAMEPREP takes place.
174 Different mapping rules can be specified for each TLD (top-level domain).
175 For example, you can have one mapping for ``.tw'' domain, and another for
178 The syntax of this entry is:
182 \f(CWlocal-map \fItld\f(CW \fIscheme\fR [\fIscheme\fR..]
186 \fItld\fR specifies the TLD to which the mapping rule is to be applied,
187 and \fIscheme\fR specifies the mapping scheme, and currently available
192 Specify mapping defined by RFC3491.
194 \f(CWfilemap:\fP\fIpathname\fP
195 Specify mapping defined by the file \fIpathname\fP.
196 See ``MAPFILE FORMAT'' for the format of this file.
199 There are two special \fItld\fRs for specifying the mapping rule for
200 local domain names (domain names without any dots in them), and the
201 default mapping rule.
203 \fItld\fR is ``-'', it matches domain names which do not contain any
205 If \fItld\fR is ``.'', it matches any domain names which don't match
206 to any other mapping rules specified by ``local-map'' entries.
209 A mapfile defines a set of character mapping rules. It can define
210 unconditional one-character to N-character-sequence (N can be 0, 1 or more)
213 A mapfile is a simple text file, and each line specifies a single mapping.
214 Each line is of the form:
218 \fIsrc-codepoint\fR\f(CW; \fImapped-codepoint-seq\fR\f(CW;\fR
222 \fIsrc-codepoint\fR indicates source character of the mapping, and must
223 be a Unicode codepoint value in hexadecimal string.
224 \fImapped-codepoint-seq\fR is a sequence of characters which is the
225 outcome of the mapping, and must be a (possibly empty) list of Unicode
226 codepoint values in hexadecimal string, separated by spaces.
228 Lines which begin with ``#'' are treated as comments and ignored.
230 A sample mapfile is shown below.
246 \fBidn.conf\fR or \fB~/.idnrc\fR doesn't have an entry to specify the
247 local codeset, since it is determined from the application's current
249 So each application can use different local codeset.
251 Although idnkit tries hard to find out the local codeset, sometimes it
252 fails. For example, there are applications which use non-ASCII codeset
253 but work in C locale. In this case, you can specify the application's
254 local codeset by an environment variable ``\fBIDN_LOCAL_CODESET\fR''.
255 Just set the codeset name (or its alias name) to the variable, and
256 idnkit will use the codeset as the local one, regardless of the locale
259 .SH "ENCODING-ALIAS-FILE"
260 Encoding alias file specifies codeset name aliases. It is located on
261 @sysconfdir@/idnalias.conf and always loaded automatically as idn.conf
262 and .idnrc. The aliases in this file can be used just as the real names.
264 The alias file is a simple text file, consisting of lines of the form:
268 \fIalias-name\fP\ \fIname\fP
272 \fIalias-name\fR is the alias name to be defined, and \fIname\fR is
273 the real name or another alias name.
275 .SH "SAMPLE CONFIGURATION"
276 The following shows a sample configuration file.
282 # a sample configuration.
285 # Use Punycode as the IDN encoding.
286 idn-encoding Punycode
288 # Use RFC3491 as NAMEPREP.
291 # Perform Japanese-specific mapping for .jp domain.
292 # assuming /usr/local/lib/idnkit/jp-map contains the mapping.
293 local-map .jp filemap:/usr/local/lib/idnkit/jp-map
299 .I @sysconfdir@/idn.conf
303 .I @sysconfdir@/idnalias.conf
305 .I @sysconfdir@/idn.conf.sample
306 \- sample configuration with comments
308 .I @sysconfdir@/idnalias.conf.sample