1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!-- $Id: clientconfig.html,v 1.6 2001/10/23 06:04:07 miyayama Exp $ -->
<html lang="en-US">
<head>
<title>client configuration specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<link rev="made" href="mailto:idn-cmt@nic.ad.jp">
<link rel="stylesheet" type="text/css" href="spec.css">
</head>
<body>
<h1>mDNkit Configuration File</h1>
<ul>
<li><a href="#overview">Overview</a>
<li><a href="#entries">Entries That Can Be Specified in the Configuration File</a>
<ul>
<li><a href="#idn-encoding">IDN Encoding Entry</a>
<li><a href="#nameprep">NAMEPREP Entry</a>
<li><a href="#nameprep-map">NAMEPREP Map Entgry</a>
<li><a href="#nameprep-normalize">NAMEPREP Normalization Entry</a>
<li><a href="#nameprep-prohibit">NAMEPREP Prohibited Character Entry</a>
<li><a href="#nameprep-unassigned">NAMEPREP Unassigned Character Entry</a>
<li><a href="#encoding-alias-file">Encoding Alias Entry</a>
<li><a href="#local-map">Local Map Entry</a>
<li><a href="#delimiter-map">Delimiter Map Entry</a>
</ul>
<li><a href="#local-encoding">Local Encoding</a>
<li><a href="#mapfile-format">Map File Format</a>
<li><a href="#setfile-format">Set File Format</a>
</ul>
<!-- =========================================================== -->
<hr>
<h2><a name="overview">Overview</a></h2>
<p>
The client configuration file describes various settings for multilingual domain name processing. This file is loaded by the client for which the mDNkit is used to make it multilingual (internationalized). The <a href="library.html#resconf">resconf module</a> of the MDN library is used to load this file and the following entries related to multilingual domains can be set.
</p>
<ul>
<li>Encoding of domain name for DNS protocol
<li>Normalization form based on NAMEPREP
<li>Alias for encoding name
<li>Normalization form unique to a specific language or top level domain
</ul>
<p>
This file is a plain text file and each line of the file (except comment lines starting with # and blank lines) consists of the following simple format.
</p>
<blockquote>
<pre>
Keyword value ...
</pre>
</blockquote>
<p>
The configuration file is placed as follows when mDNkit is compiled with the default settings.
</p>
<blockquote>
<pre>
/usr/local/etc/mdn.conf
</pre>
</blockquote>
<p>
The setting content is discussed below for each keyword.
</p>
<!-- =========================================================== -->
<hr>
<h2><a name="entries">Entries That Can be Specified using the Configuration File</a></h2>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="idn-encoding"><code>idn-encoding</code></a></h3>
<p>
Specifies the encoding for multilingual domain names used by the resolver and DNS server.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>idn-encoding</code> <var><encoding></var>
</p>
</blockquote>
<p>
The following names can be specified as <var><encoding></var>.
</p>
<blockquote>
<ul>
<li><code>Punycode</code>
<li><code>AMC-ACE-Z</code> (it is the old name of Punycode)
<li><code>RACE</code>
<li><code>DUDE</code>
<li>Encoding name recognized by <code>iconv_open()</code> of your system.
<li>Alias name of the above encoding defined in the alias definition file (refer to <a href="#encoding-alias-file"><code>encoding-alias-file</code></a>).
</ul>
</blockquote>
<p>
[Setting example]
</p>
<blockquote>
<pre>
idn-encoding Punycode
</pre>
</blockquote>
<p>
There is no client-encoding entry because the local encoding at the application side is determined by the locale. Local encoding is explained in <a href="#local-encoding">later section</a>.
</p>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="nameprep"><code>nameprep</code></a></h3>
<p>
NAMEPREP prescribes the normalization scheme for multilingual domain names.
This entry is used to specify which version of NAMEPREP is used.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>nameprep</code> <var><version></var>
</p>
</blockquote>
<p>
The following can be specified in <var><version></var>.
</p>
<blockquote>
<dl>
<dt><code>nameprep-03</code>
<dd>Normalization scheme corresponding to Internet draft <a href="../../reference/draft/draft-ietf-idn-nameprep-03.txt">draft-ietf-idn-nameprep-03.txt</a>.
<dt><code>nameprep-05</code>
<dd>Normalization scheme corresponding to Internet draft <a href="../../reference/draft/draft-ietf-idn-nameprep-05.txt">draft-ietf-idn-nameprep-05.txt</a>.
<dt><code>nameprep-06</code>
<dd>Normalization scheme corresponding to Internet draft <a href="../../reference/draft/draft-ietf-idn-nameprep-06.txt">draft-ietf-idn-nameprep-06.txt</a>.
<dt><code>nameprep-07</code>
<dd>Normalization scheme corresponding to Internet draft <a href="../../reference/draft/draft-ietf-idn-nameprep-07.txt">draft-ietf-idn-nameprep-07.txt</a>.
</dl>
</blockquote>
<p>
[Setting example]
</p>
<blockquote>
<pre>
nameprep nameprep-07
</pre>
</blockquote>
<p>
The NAMEPREP processing procedure consists of the following three steps.
</p>
<ol>
<li>Mapping<br>
<li>Normalization <br>
<li>Prohibited check, unassigned check
</ol>
<p>
In addition to the <code>nameprep</code> entry, entries used to specify the version for each process are also provided.
</p>
<blockquote>
<p>
<code>nameprep-map</code> <var><version></var><br>
<code>nameprep-normalize</code> <var><version></var><br>
<code>nameprep-prohibit</code> <var><version></var><br>
<code>nameprep-unassigned</code> <var><version></var><br>
</p>
</blockquote>
<p>
When the above four entries are combined, the same operation takes place as when the following is specified.
</p>
<blockquote>
<p>
<code>nameprep</code> <var><version></var>
</p>
</blockquote>
<p>
When both <code>nameprep</code> and other detailed entries are specified, the detailed entry takes precedence.
</p>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="nameprep-map"><code>nameprep-map</code></a></h3>
<p>
This entry is used to specify the mapping method in NAMEPREP.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>nameprep-map</code> <var><scheme></var> ...
</p>
</blockquote>
<p>
Use <var><scheme></var> to specify the mapping method. When more than one method is specified, they apply in that order (from left to right). The following can be specified in <var><scheme></var>.
</p>
<blockquote>
<dl>
<dt><var><version></var>
<dd>Mapping following the special version of NAMEPREP. For available version numbers, refer to <a href="#nameprep"><code>nameprep</code></a>.
<dt><code>filemap:</code><var><pathname></var>
<dd>The mapping definition is loaded from <var><pathname></var> file. For information on how to include descriptions in the file, refer to <a href="#mapfile-format">Map File Format</a>.
</dl>
</blockquote>
<p>
[Setting example]
</p>
<blockquote>
<pre>
nameprep-map nameprep-07
</pre>
</blockquote>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="nameprep-normalize"><code>nameprep-normalize</code></a></h3>
<p>
This entry is used to specify the normalization scheme in NAMEPREP.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>nameprep-normalize</code> <var><scheme></var> ...
</p>
</blockquote>
<p>
Use <var><scheme></var> to specify the normalization scheme name. When more than one scheme is specified, they apply in order (from left to right). The following can be specified in <var><scheme></var>.
</p>
<blockquote>
<dl>
<dt><var><version></var>
<dd>Normalization following the specific version of NAMEPREP.
For available version numbers, refer to <a href="#nameprep"><code>nameprep</code></a>.
<dt><code>unicode-form-kc</code>
<dd>Unicode normalization form KC by the latest version in Unicode version mDNkit supports.
<dt><code>unicode-form-kc/3.0.1</code>
<dd>Unicode normalization form KC by Unicode version 3.0.1.
<dt><code>unicode-form-kc/3.1.0</code>
<dd>Unicode normalization form KC by Unicode version 3.1.0.
</dl>
</blockquote>
<p>
[Setting example]
</p>
<blockquote>
<pre>
nameprep-normalize unicode-form-kc
</pre>
</blockquote>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="nameprep-prohibit"><code>nameprep-prohibit</code></a></h3>
<p>
This entry is used to specify the method of checking for prohibited characters in NAMEPREP.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>nameprep-prohibit</code> <var><set></var> ...
</p>
</blockquote>
<p>
Use <var><set></var> to specify the name of the prohibited character set.
When more than one character set is specified, they apply in order (from left to right).
The following can be specified in <var><set></var>.
</p>
<blockquote>
<dl>
<dt><var><version></var>
<dd>Prohibited character sets described in the specific version of NAMEPREP.
For available version numbers, refer to <a href="#nameprep"><code>nameprep</code></a>.
<dt><code>fileset:</code><var><pathname></var>
<dd>The definition of prohibited characters is loaded from the <var><pathname></var>file.
For information on how to include descriptions in the file, refer to <a href="#setfile-format">Set File Format</a>.
</dl>
</blockquote>
<p>
[Setting example]
</p>
<blockquote>
<pre>
nameprep-prohibit nameprep-07
</pre>
</blockquote>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="nameprep-unassigned"><code>nameprep-unassigned</code></a></h3>
<p>
This entry is used to specify the method of checking for unassigned code points (code points for which characters are not assigned) in NAMEPREP.
When more than one method is specified, they apply in order (from left to right).
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>nameprep-unassigned</code> <var><set></var> ...
</p>
</blockquote>
<p>
Use <var><set></var> to specify the unassigned code point set name.
When more than one character set is specified, they apply in order (from left to right).
The following can be set in <var><set></var>.
</p>
<blockquote>
<dl>
<dt><var><version></var>
<dd>Prohibited character set described in the specific version of NAMEPREP.
For available verison numbers, refer to <a href="#nameprep"><code>nameprep</code></a>.
<dt><code>fileset:</code><var><pathname>></var>
<dd>The definition for unassigned code points is loaded from <var><pathname></var>file
For information on how to include descriptions in the file, refer to <a href="#setfile-format">Set File Format</a>.
</dl>
</blockquote>
<p>
[Setting example]
</p>
<blockquote>
<pre>
nameprep-unassigned nameprep-07
</pre>
</blockquote>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="encoding-alias-file"><code>encoding-alias-file</code></a></h3>
<p>
The encoding code set name can be added as an alias.
In this example, the path name to the alias definition file to be added is specified.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>encoding-alias-file</code> <var><path></var>
</p>
</blockquote>
<p>
Specify the path name to the definition file to <var><path></var>.
</p>
<p>
[Setting example]
</p>
<blockquote>
<pre>
encoding-alias-file /some/where/mdnalias.txt
</pre>
</blockquote>
<p>
The alias definition file is a plain text file and one alias name is set in each line. The format for each line is as follows.
</p>
<blockquote>
<p>
<var><Alias></var> <var><Original name></var>
</p>
</blockquote>
<p>
Instead of encoding name <var><Original name></var>, <var><Alias></var> becomes available.
</p>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="local-map"><code>local-map</code></a></h3>
<p>
This entry is used to specify local mapping applied to domain names before NAMEPREP is applied.
This mapping can be specified separately for each top level domain (TLD) of domain names.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>local-map</code> <var><TLD></var> <var><scheme></var> ...
</p>
</blockquote>
<p>
Specify TLD for which mapping applies in <var><TLD></var> and the mapping scheme name in <var><scheme></var>, respectively.
When more than one scheme is specified, they apply in order (from left to right).
The schemes that can be specified are the same as for <a href="#nameprep-map"><code>nameprep-map</code></a>.
</p>
<p>
[Setting example]
</p>
<blockquote>
<pre>
local-map .jp filemap:/some/where/jp.map
local-map - filemap:/some/where/notld.map
local-map . filemap:/some/where/default.map
</pre>
</blockquote>
<p>
Specifying hyphen ('<code>-</code>') for TLD means that mapping applies to domain names without TLD, that is, domain names without periods ('<code>.</code>').
In the same way, when a period is specified for TLD, mapping applies to domain names that do not match any of the TLDs of other <code>local-map</code> entries.
</p>
<p>
Except when the TLD is a period ('<code>.</code>'), the period at the beginning of a TLD can be omitted.
</p>
<!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<h3><a name="delimiter-map"><code>delimiter-map</code></a></h3>
<p>
This entry is used to specify the character used to map a period.
Normally, a period ('<code>.</code>') is used as a delimiter between labels of domain names. The character specified in this entry can be used as the delimiter in instead of a period.
</p>
<p>
[Syntax]
</p>
<blockquote>
<p>
<code>delimiter-map</code> <var><code point></var> ...
</p>
</blockquote>
<p>
Use a hexadecimal to describe the Unicode code point in <var><code point></var>.
</p>
<p>
[Setting example]
</p>
<blockquote>
<pre>
delimiter-map 3002
</pre>
</blockquote>
<!-- =========================================================== -->
<hr>
<h2><a name="local-encoding">Local Encoding</a></h2>
<p>
There is no entry for setting local encoding in the configuration file because it is automatically determined by referencing the locale or environment variable.
</p>
<p>
However, the following cases cannot automatically be sensed.
</p>
<ul>
<li>When an application that does not use the <code>setlocate()</code> function is executed
<li>When an application is executed as a C locale
<li>When the relationship between locale and encoding is not known
</ul>
<p>
Specify the <code>MDN_LOCAL_CODESET</code> environment variable to set local encoding. For example, to set local encoding to EUC-JP, set the following settings beforehand.
</p>
<p>
[Setting example]
</p>
<blockquote>
<p>
sh(Shell) Series:
</p>
<pre>
$ MDN_LOCAL_CODESET=EUC-JP
$ export MDN_LOCAL_CODESET
</pre>
<p>
csh(Shell) Series:
</p>
<pre>
% setenv MDN_LOCAL_CODESET EUC-JP
</pre>
</blockquote>
<p>
The value to be specified is a local encoding name that must be specified using a name that is accepted by the <code>iconv()</code> function in the system (or more precisely <code>iconv_open()</code>). This name differs with the <code>iconv</code> implementation; refer to the <code>iconv</code> document for details.
</p>
<p>
If you only use a single type of local encoding, it is recommended that you save this setting in <code>.profile</code> or <code>.cshrc</code>.
</p>
<!-- =========================================================== -->
<hr>
<h2><a name="mapfile-format">Map File Format</a></h2>
<p>
The map file defines character mapping rules for <a href="#nameprep-map"><code>nameprep-map</code></a> and <a href="#local-map"><code>local-map</code></a> entries.
You can specify one character as the source and a string of 0 or more characters as mapped characters.
Mapping relying on the context that the mapping rules change according to the front and rear characters cannot be performed.
</p>
<p>
The map file is a plain text file and one mapping rule is written in each line. The mapping rule is written in the following format.
</p>
<blockquote>
<p>
<var><Source code point></var>; <var><Mapped code point string></var>;
</p>
</blockquote>
<p>
Use hexadecimal to describe Unicode code points of source characters in <var><Source code point></var>.
Write Unicode code point values for each character in the mapped character string in <var><Mapped code point string></var> in hexadecimal.
Arrange from the beginning of the characters in order using a space as the delimiter. When the mapped character is a blank character string, <var><Mapped code point string></var> is blank.
</p>
<p>
[Setting example]
</p>
<blockquote>
<pre>
# Map "A" to "a"
0041; 0061;
# Do not map "#"
0023; ;
# Map "@" to "at"
0040; 0061 0074;
</pre>
</blockquote>
<!-- =========================================================== -->
<hr>
<h2><a name="setfile-format">Set File Format</a></h2>
<p>
The set file defines a set of Unicode code points that cannot be used as domain names for <a href="#nameprep-prohibit"><code>nameprep-prohibit</code></a> and <a href="#nameprep-unassigned"><code>nameprep-unassigned</code></a> entries.
</p>
<p>
The set file is a plain text file. Write one code point in each line or write the code point range. The format is as follows.
</p>
<blockquote>
<p>
<var><Code point></var><br>
<var><Starting code point></var>-<var><Ending code point></var>
</p>
</blockquote>
<p>
Use hexadecimal to describe Unicode code points for code points.
Lines that begin with <code> '#'</code> and blank lines are ignored.
</p>
<p>
[Setting example]
</p>
<blockquote>
<pre>
# Prohibit tilde symbols
007E
# Prohibit control characters
0000-001F
007F-000F
# Prohibit characters other than Basic Multilingual Plane (BMP) of Unicode
10000-10FFFF
</pre>
</blockquote>
</body>
</html>
|