Copyright (c) 2000,2001 Japan Network Information Center.
All rights reserved.
By using this file, you agree to the terms and conditions set forth bellow.
LICENSE TERMS AND CONDITIONS
The following License Terms and Conditions apply, unless a different
license is obtained from Japan Network Information Center ("JPNIC"),
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
Chiyoda-ku, Tokyo 101-0047, Japan.
1. Use, Modification and Redistribution (including distribution of any
modified or derived work) in source and/or binary forms is permitted
under this License Terms and Conditions.
2. Redistribution of source code must retain the copyright notices as they
appear in each source code file, this License Terms and Conditions.
3. Redistribution in binary form must reproduce the Copyright Notice,
this License Terms and Conditions, in the documentation and/or other
materials provided with the distribution. For the purposes of binary
distribution the "Copyright Notice" refers to the following language:
"Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
4. The name of JPNIC may not be used to endorse or promote products
derived from this Software without specific prior written approval of
JPNIC.
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
~/.idnrc
@sysconfdir@/idnalias.conf
idnkit library tries to load the user's configuration file ~/.idnrc first, and then tries the system configutation file @sysconfdir@/idn.conf. Note that idnkit library loads either, not both.
To use internationalized domain names in DNS or other protocols, they must be converted to an appropriate format before further processing. In idnkit, this conversion process is comprised of the following tasks.
The configuration file specifies the parameters for these tasks, such as:
keyword value..
The syntax of this entry is:
idn-encoding encoding
encoding is the encoding name to be used, and any of the following names can be specified.
The standard encoding was determined as Punycode.
The syntax of this entry is:
nameprep version
version is the version name of NAMEPREP specification, and currently the following versions can be specified.
The NAMEPREP process consists of the following 4 subprocesses.
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 available schemes are:
4 RFC3491 Specify mapping defined by RFC3491.
4 filemap:pathname 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 for
local domain names (domain names without any dots in them), and the
default mapping rule.
If
tld is ``-'', it matches domain names which do not contain any
dots.
If tld is ``.'', it matches any domain names which don't match
to any other mapping rules specified by ``local-map'' entries.
A mapfile is a simple text file, and each line specifies a single mapping. Each line is of the form:
src-codepoint; mapped-codepoint-seq;
src-codepoint indicates source character of the mapping, and must be a Unicode codepoint value in hexadecimal string. mapped-codepoint-seq is a sequence of characters which is the outcome of the mapping, and must be a (possibly empty) list of Unicode codepoint 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 nothing 0023; ; # map "@" to "at" 0040; 0061 0074;
Although idnkit tries hard to find out the local codeset, sometimes it
fails. For example, there are applications which use non-ASCII codeset
but work in C locale. In this case, you can specify the application's
local codeset by an environment variable ``IDN_LOCAL_CODESET''.
Just set the codeset name (or its alias name) to the variable, and
idnkit will use the codeset as the local one, regardless of the locale
setting.
The alias file is a simple text file, consisting of lines of the form:
alias-name name
alias-name is the alias name to be defined, and name is
the real name or another alias name.
# # 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
~/.idnrc
@sysconfdir@/idnalias.conf
@sysconfdir@/idn.conf.sample - sample configuration with comments
@sysconfdir@/idnalias.conf.sample - sample alias file