メインコンテンツへジャンプする

JPNICはインターネットの円滑な運営を支えるための組織です

ロゴ:JPNIC

WHOIS 検索 サイト内検索 WHOISとは? JPNIC WHOIS Gateway
WHOIS検索 サイト内検索

Client Configuration File


Overview

The client configuration file is the file in which various settings for multilingual domain names processing are described. This file is loaded by the resolver at the client side for which the mDNkit is used to make it multilingual (internationalized). The resconf module of the MDN library is used to load this file and the following settings related to multilingual domains can be specified.

  • Encoding of domain name for the DNS protocol
  • Normalization form
  • Alternate encoding used when domain names in the return message from the DNS cannot be converted to local encoding
  • Alias for encoding name

This file is a plain text file and each line of the file (except comment lines starting with # and blank lines) consists of following simple format.

Keyword  Value...

The client configuration file is located as follows when the mDNkit is compilied using the default settings.

/usr/local/etc/mdnres.conf

The setting content is discussed below for each keyword.

Server Encoding Entry

Specifies encoding (code set name) used as the encoding for multilingual domain name in the DNS protocol.

[Syntax]
server-encoding encoding

The encoding name to be used is described in encoding and the following types can be specified.

  • UTF-8
  • RACE
  • BRACE
  • LACE
  • UTF-5
  • Refer to the document for iconv() for code set names permitted by the iconv_open() library function (code set names that can be used).
  • Alias name defined by the alias file is explained later. (Refer to the "Encoding Alias") section.

This entry is a essential and must always be described.

Server ZLD Entry

Of the encoding types (specified by server-encoding entry) for multilingual domain names used by the DNS protocol, some require a domain called ZLD (zero-level domain) in order to distinguish multilingual domain names from conventional ASCII domain names. ZLD is equivalent to a higher level domain that is above the usual top level domain. Note, however, that this domain is only used inside the DNS system and ordinary users and application cannot see this domain.

[Syntax]
server-zld ZLD

ZLD cannot be used in the default settings of the mDNkit. When this entry exists in the configuration file, a warning message is displayed. To make this entry specification effective, it is necessary to use the --enable-zld option to make ZLD support effective when executing configuration of the mDNkit.

Normalization Entry

The normalization entry is used to specify the normalization scheme that should be applied to domain names before sending it to the DNS server.

[Syntax]
normalize scheme [scheme..]

The normalization form is described in scheme. The following formats can be described.

ascii-lowercase
Converts ASCII uppercase to lowercase
ascii-uppercase
Converts ASCII lowercase to uppercase
unicode-lowercase
Converts Unicode uppercase to lowercase based on Unicode Technical Report #21: Case Mappings
unicode-uppercase
Converts Unicode lowercase to uppercase based on Unicode Technical Report #21: Case Mappings
unicode-form-c
Performs normalization using "Form C" of Unicode Technical Report #15: Unicode Normalization Forms
unicode-form-kc
Performs normalization using "Form KC" Unicode Technical Report #15: Unicode Normalization Forms
ja-kana-fullwidth
Converts half-width Japanese katakana to full-width Japanese katakana
ja-alnum-halfwidth
Converts full-width Japanese alphanumeric characters and full-width minus symbols to ASCII characters.
ja-compose-voiced-sound
Converts Japanese kana (hiragana or katakana) and following voiced sound mark (゛) or semi-voiced sound mark (゜) to one kana (hiragana or katakana) character attached with a voiced or semi-voiced sound mark.
ja-minus-hack
Converts full-width Japanese minus symbol (-) to hyphen (-).
ja-delimiter-hack
Converts Japanese ideographic full stop (。) and full-width period (.) to ASCII period (.).

More than one formats can be specified for the normalization method. When more than one method is specified, they are applied in the order indicated (from left to right).

Alternate Encoding Entry

Resolver library that was made multilingual by the mDNkit automatically determines the local code set used by the application, and tries to convert the domain name in the response message of DNS to that code set. However, conversion may fail because some characters used for the domain name are not mapped in the local code set. For example, this happens when a Japanese application using the Japanese code set receives a DNS response that includes Chinese characters that are not included in the Japanese character set.

The alternate encoding entry specifies a code set to be used instead of the local code set when the above type of problem occurs.

[Syntax]
alternate-encoding encoding

encoding is a code set name and ASCII-conpatible encoding such as RACE must be used.

Encoding Alias Entries

The encoding alias entry contains a description of the path to the file that describes the alias of the code set name.

[Syntax]
alias-file pathname

pathname specifies the path for the alias file. This alias file is a plain text file and consists of lines in the following format.

alias-name name

alias-name is the defined alias name and name is the actual code set name or previously defined alias name.

Local Code Set

The client configuration file does not have an entry used to specify local code set. This is because the local code set is determined based on the locale information used by the application at that time. Therefore, each application can use a different local code set and also a single application can use more than one local code sets by switching between them.

mDNkit tries to guess the local code set used by the application based on locale information but it sometimes fails to do so. For example, though an application may run in the C locale, if the application uses a non-ASCII code set it is impossible to determine the local code set from the locale information. Also, mDNkit will fail when it attempts to guess the local code set an application uses if it does not understand the locale information.

In such cases, the environment variable MDN_LOCAL_CODESET can be used to forcefully specify the local code set used by the application. When the code set name (or its alias name) specifies this variable, mDNkit operates using the specified code set as the local code set regardless of the locale setting.

Configuration File Description Example

Description examples of the configuration file are shown below.

#
# a sample configuration.
#

# Uses RACE as encoding for the DNS protocol
server-encoding RACE

# For the normalization procedure, converts to lowercase and then 
# uses the KC normalization method 
normalize unicode-lowercase unicode-form-kc

# Uses RACE for alternate encoding 
alternate-encoding RACE

このページを評価してください

このWebページは役に立ちましたか?
よろしければ回答の理由をご記入ください

それ以外にも、ページの改良点等がございましたら自由にご記入ください。

回答が必要な場合は、お問い合わせ先をご利用ください。

ロゴ:JPNIC

Copyright© 1996-2024 Japan Network Information Center. All Rights Reserved.