idn.conf
NAMESYNOPSIS
DESCRIPTION
SYNTAX
IDN-ENCODING ENTRY
NAMEPREP ENTRY
LOCAL-MAP ENTRY
MAPFILE FORMAT
LOCAL CODESET
ENCODING-ALIAS-FILE
SAMPLE CONFIGURATION
FILES
SEE ALSO
NAME
idn.conf, .idnrc, idnalias.conf − configuration files for idnkit library
SYNOPSIS
/etc/idn.conf
~/.idnrc
/etc/idnalias.conf
DESCRIPTION
idn.conf and .idnrc are configuration files for idnkit library which is a toolkit for handling internationalized domain names.
idnkit library tries to load the user’s configuration file ~/.idnrc first, 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, they must be converted to an appropriate format before further processing. In idnkit, this conversion process is comprised of the following tasks.
1. |
Convert the given domain name in application’s local codeset to Unicode, and vice versa. | ||
2. |
Map certain characters in the name to period character so that they are treated as the domain name delimiter (delimiter mapping). | ||
3. |
Map certain characters in the name to other characters or chracter sequences, according to a mapping rule determined by its top level domain (TLD). | ||
4. |
Perform NAMEPREP, which is a starndard name preparation process for internationalized domain names. This process is composed of the tree steps called mapping, normalization, prohibited character checking and bidirectional string checking. | ||
5. |
Convert the nameprepped name to IDN encoding, which is the standard encoding for 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. |
SYNTAX
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:
keyword value..
IDN-ENCODING ENTRY
IDN encoding entry specifies the encoding name (codeset name) which is used as the encoding of internationalized domain names.
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.
• |
‘‘Punycode’’ | ||
• |
‘‘UTF-8’’ | ||
• |
Codeset names which iconv_open() library function accepts. Please consult 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
Nameprep entry specifies the version of NAMEPREP, which is a specification of ‘‘canonicalization’’ process of internationalized domain name before it is converted to the IDN encoding.
The syntax of this entry is:
nameprep version
version is the version name of NAMEPREP specification, and currently the following versions can be specified.
• |
‘‘RFC3491’’ |
This version refers to RFC3491 ‘‘rfc-3491.txt’’.
The NAMEPREP process consists of the following 4 subprocesses.
1. |
mapping, which maps certain characters in a name to other characters, possibly none. | ||
2. |
normalization, which replaces character variants in a name to a unique one. | ||
3. |
prohibited character checking, which detects invalid characters in a name. | ||
4. |
unassigned codepoint checking, which also invalid codepoints in a name. | ||
5. |
bidirectional string checking, which detecs invalid string. |
LOCAL-MAP ENTRY
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 available schemes are:
RFC3491
Specify mapping defined by RFC3491.
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.
MAPFILE FORMAT
A mapfile defines a set of character mapping rules. It can define unconditional 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; 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;
LOCAL CODESET
idn.conf or ~/.idnrc doesn’t have an entry to specify the local codeset, since it is determined from the application’s current locale information. So each application can use different local codeset.
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.
ENCODING-ALIAS-FILE
Encoding alias file specifies codeset name aliases. It is located on /etc/idnalias.conf and always loaded automatically as idn.conf and .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 name
alias-name is the alias name to be defined, and name is the real name or another alias name.
SAMPLE CONFIGURATION
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
FILES
/etc/idn.conf
~/.idnrc
/etc/idnalias.conf
/etc/idn.conf.sample − sample configuration with
comments
/etc/idnalias.conf.sample − sample alias file
SEE ALSO
More Linux Commands
manpages/Tcl_UtfBackslash.3.html
Tcl_UtfBackslash(3) - routines for manipulating UTF-8 string
These routines convert between UTF-8 strings and Tcl_UniChars. A Tcl_UniChar is a Unicode character represented as an unsigned, fixed-size quantity. A UTF-8 cha
manpages/free_hugepages.2.html
free_hugepages(2) - allocate or free huge pages (Man Page)
The system calls alloc_hugepages() and free_hugepages() were introduced in Linux 2.5.36 and removed again in 2.5.54. They existed only on i386 and ia64 (when bu
manpages/mount.ntfs-3g.8.html
mount.ntfs-3g(8) - Third Generation Read/Write NTFS Driver
ntfs-3g is an NTFS driver, which can create, remove, rename, move files, directories, hard links, and streams; it can read and write files, including streams, s
manpages/ldap_sort_strcasecmp.3.html
ldap_sort_strcasecmp(3) - LDAP sorting routines (deprecated)
The ldap_sort_entries(), ldap_sort_values(), and ldap_sort_strcasecmp() are deprecated. Deprecated interfaces generally remain in the library. The macro LDAP_DE
manpages/defer.8.html
defer(8) - Postfix delivery status reports - Linux man page
The bounce(8) daemon maintains per-message log files with delivery status information. Each log file is named after the queue file that it corresponds to, and i
manpages/pia.1.html
pia(1) play media files (Commands - Linux manual page)......
pia is a small X11 tool which plays movie files. OPTIONS pia understands the usual toolkit options (-geometry + friends). Additional options are: -h display hel
manpages/cfgetispeed.3.html
cfgetispeed(3) - get and set terminal attributes, line contr
The termios functions describe a general terminal interface that is provided to control asynchronous communications ports. The termios structure Many of the fun
manpages/famd.8.html
famd(8) - The File Alteration Monitor (FAM) daemon (ManPage)
FAM, the File Alteration Monitor, is a subsystem that applications can use to be notified when specific files or directories are changed. It is intended as a re
manpages/fchmod.2.html
fchmod(2) - change permissions of a file - Linux man page...
The chmod() and fchmod() system calls change the permissions of a file. They differ only in how the file is specified: * chmod() changes the permissions of the
manpages/gnutls_auth_client_get_type.3.html
gnutls_auth_client_get_type(3) - API function (Man Page)....
Returns the type of credentials that were used for client authentication. The returned information is to be used to distinguish the function used to access auth
manpages/Tk_MoveWindow.3.html
Tk_MoveWindow(3) - change window configuration or attributes
These procedures are analogous to the X library procedures with similar names, such as XConfigureWindow. Each one of the above procedures calls the correspondin
manpages/gnutls_openpgp_crt_init.3.html
gnutls_openpgp_crt_init(3) - API function - Linux man page
gnutls_openpgp_crt_init.3 - This function will initialize an OpenPGP key structure. RETURNS GNUTLS_E_SUCCESS on success, or an error code. REPORTING BUGS Report
