mdnres.conf(5)

NAME
mdnres.conf - configuration file for the mDNkit client-side library

SYNOPSIS
@ETCDIR@/mdnres.conf

DESCRIPTION
mdnres.conf is read by the client-side resolver which is multilingualized (internationalized) using mDNkit. This file specifies various properties regarding multilingual domain names such as:
    - the encoding of domain names in DNS protocol.
    - normalization schemes.
    - the alternative encoding which is used in case the domain name in
       the DNS reply message cannot be convertible to the local encoding.
    - encoding name aliases.

This file is a simple text file, and each line in the file (other than comment lines that begin with # and empty lines) forms an entry of the following format:

    keyword value..
."

SERVER ENCODING ENTRY
Server encoding entry specifies the encoding name (codeset name) which is used as the encoding of multilingualized domain names by the DNS protocol.

The syntax of this entry is:

    server-encoding encoding

encoding is the encoding name to be used, and any of the following names can be specified.

    •   ``UTF-8''

    •   ``RACE''

    •   ``BRACE''

    •   ``LACE''

    •   ``UTF-5''

    •   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 ENTRY'')

SERVER ZLD ENTRY
Some of the encodings used by internationalized name servers (the one specified by `server-encoding' entry) requires ZLD (zero-level domain), additional toplevel domain that is hidden from users/applications. This entry specifies the ZLD.

The syntax of this entry is:

    server-zld ZLD

Note that this entry is ignored unless mDNkit is configured with --enable-zld so that its ZLD support is enabled.

NORMALIZATION ENTRY
Normalization entry specifies the normalization schemes which should be applied to the domain names before sending them to name servers. The syntax of this entry is:

    normalize scheme [scheme..]

scheme is the normalization scheme, and following shows the currently available schemes:

    ascii-lowercase
        Convert ASCII uppercase letters to lowercase.

    ascii-uppercase
        Convert ASCII lowercase letters to uppercase.

    unicode-lowercase
        Convert Unicode uppercase letters to lowercase, based on ``Unicode Technical Report #21: Case Mappings''. Note that only locale-independent conversion is supported.

    unicode-uppercase
        Convert Unicode lowercase letters to uppercase, based on ``Unicode Technical Report #21: Case Mappings''. Note that only locale-independent conversion is supported.

    unicode-form-c
        Perform Unicode normalization called ``Unicode Normalization Form C''.

    unicode-form-kc
        Perform Unicode normalization called ``Unicode Normalization Form KC''.

    ja-compose-voiced-sound
        Compose Japanese full-width hiragana/katakana character and the following (semi) voiced sound mark (dakuten or han-dakuten in Japanese) into a single combined letter if such letter exists.

    ja-kana-fullwidth
        Convert Japanese half-width kana characters to full-width.

    ja-alnum-halfwidth
        Convert full-width alphabets, digits and minus sign to half-width.

    ja-minus-hack
        Convert Japanese full-width minus sign (Unicode ``MINUS SIGN'') to ``-'' (Unicode ``HYPHEN-MINUS'').

More than one schemes can be specified. If multiple schemes are specified, they are applied in turn.

ALTERNATIVE ENCODING ENTRY
The resolver library multilingualized by mDNkit automatically determines the local codeset the application uses, and tries to convert domain names in a DNS reply message to the codeset. However, it is possible that the conversion fails because some characters in the domain names have no mapping to the local codeset. This occurs, for example, when a Japanese application using Japanese codeset receives a DNS reply containing Chinese characters which are not included in the Japanese character set.

Alternative encoding entry specifies the codeset name to be used instead of the local codeset in case the above problem happens.

The syntax of this entry is:

    alternate-encoding encoding

encoding is the name of the codeset. It must be an ASCII-compatible encoding such as RACE.

ENCODING ALIAS ENTRY
Encoding alias entry specifies the file containing codeset name aliases. The aliases can be used just as the real names.

The syntax of this entry is:

    alias-file pathname

pathname specifies the path name of the alias file. 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.

LOCAL CODESET
mdnres.conf does not 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 mDNkit 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 ``MDN_LOCAL_CODESET''. Just set the codeset name (or its alias name) to the variable, and mDNkit will use the codeset as the local one, regardless of the locale setting.

SAMPLE CONFIGURATION
The following shows a sample configuration file.
    #
    # a sample configuration.
    #
    # Use RACE as the DNS protocol encoding.
    server-encoding RACE
    # Use lowercase conversion and Normalization Form KC for normalization.
    normalize unicode-lowercase unicode-form-kc
    # Use RACE as the alternative encoding.
    alternate-encoding RACE

FILES
@ETCDIR@/mdnres.conf
@ETCDIR@/mdnres.conf.sample - sample configuration with comments

SEE ALSO
iconv(3)