Windows で多言語ドメイン名を扱えるようにするためには、Windows 上のクライアントアプリケーションにおいて、解決しようとする名前のエンコーディングを、DNS サーバが受付ける形式のものに変換する必要があります。これは、Windows 上のアプリケーションが、きちんと多言語ドメイン名を扱えるようになっていなければならない、ということであり、本来はそれぞれのプログラムの作成者が行なうべきことです。
To enable Windows to support multilingual domain names, the name encoding that client applications resolve must be converted to a format that DNS servers can accept. This requires accurate handling of multilingual domain names by Windows applications, which is basically the responsibility of each program developer.
しかし、標準が決まっていない現状では、プログラム作成者にこのような対応を期待するのは無理なので、既存のアプリケーションを多言語ドメイン名対応させるためのトリックが必要になります。mDNkitに含まれるdnsproxyサーバはそのための一つの方法です。 ここでは、もう一つの方法、mDN Wrapper を提示します。
However, as no standard is yet in place, this is too much to expect of program developers at this time. Therefore, a trick is needed so that existing applications will be able to support multilingual domain names. The dnsproxy server supplied with the mDNkit is one such tool. In this draft, we will introduce another tool, the mDN Wrapper.
Windows において、多くの場合、ドメイン名解決の要求はWINSOCK DLLに渡されます。そこで、WINSOCK DLL を多言語ドメイン名対応のものに置き換えてやれば、既存のプログラムからでも多言語ドメイン名を使うことができるようになります。
Queries to resolve domain names in Windows are often passed to WINSOCK DLL. By replacing WINSOCK DLL with one that supports multilingual domain names, it will be possible for existing programs to support multilingual domain names.
*注意* もし古いバージョンの mDN Wrapper がすでにインストールされているマシンに新しいバージョンをインストールする場合には、まずバージョンアップ時の注意をご覧ください。
*Note:* If an old version of mDN Wrapper is already installed, read the Precautions in Upgrading before installing the new version.
mDN Wrapper をインストールするには"setup.exe" を実行します。セットアッププログラムは次のような処理を行います。
Use "setup.exe" to install mDN Wrapper. The setup program does the following.
Copy the file containing mDN Wrapper to the 「\Program Files\JPNIC\mDN Wrapper」(can be changed at setup) directory.
Create the required registry key and registry values under HKEY_LOCAL_MACHINE\Software\JPNIC\MDN. The major items are as follows.
An encoding name used on the DNS server side. The default value is "RACE", which is currently the leading encoding scheme. The encoding name can be changed using the configuration program.
A domain name normalization scheme used to specify normalization names (multiple names must be separated by spaces). It is set to a default value that is considered appropriate for normalization of Japanese domain names. This value can also be changed using configuration program.
A key used to store values set for each program. Program specific setting is stored with its executable module name used as a key. The following two types of infomration is set.
PerProg\<progname>\Where | REG_DWORD | 変換位置 Conversion location |
PerProg\<progname>\Encoding | REG_SZ | エンコーディング名 Encoding name |
エンコーディング名は通常コンフィギュレーションプログラムによって設定されます。 変換位置の指定は、標準インストールでは不要です。 システムディレクトリへのインストールを行なった場合には、レジストリエディタで環境に合わせて設定する必要があります。
The encoding name is normally specified by the configuration program. The conversion location is not required for a standard installation. When the program is installed in the system directory, the registry editor must be used to adjust the environment.
Create a configuration program icon and place it in the Start menu. This icon allows you to start up the configuration program.
アンインストールするには、コントロールパネルの「アプリケーションの追加と削除」で、「mDN Wrapper」を選択して削除(「追加と削除」ボタン)します。
To uninstall the program, select "mDN Wrapper" in Add/Remove Programs in the Control Panel and click the Add/Remove button.
コンフィギュレーションプログラムは、アプリケーションを特定して mDN Wrapper を適用したり、適用を解除するためのツールです。
The configuration program is a tool for specifying applications that are to be wrapped or unwrapped.
起動すると以下のような画面が表示されます。
The screen shown below appears when the program is started.
リストボックスには、その時点で mDN Wrapper が適用されているプログラムが表示されます。最初に実行した場合には空になっています。右側のボタンを押すことにより、操作を行うことができます。
The list box shows programs that mDN Wrapper is currently wrapping. The box is blank when the program first starts. Press the buttons on the right to begin.
Press the "Wrap.." button to wrap a program using mDN Wrapper. Pressing the "Wrap.." button displays the following dialog box.
最初に、mDN Wrapper を適用したいプログラムの実行ファイル名を設定します。 直接入力するか、ブラウズボタンでファイルを探してください。
First set the filename of the program that mDN Wrapper is to wrap. Enter the name directly or use the Browse button to find the file.
次にそのプログラムのローカルエンコーディングを指定します。 通常は「Default」 でかまいません。 プログラムが国際化エンコーディングに従っている場合にのみ「UTF-8」 を指示します。
Then, specify the local encoding of the program. Select "Default" for the standard setting. Select UTF-8 only if the program supports international encoding.
最後に "Wrap" ボタンを押せば、そのプログラムに対して指定されたエンコーディングで mDN Wrapper が適用されます。 適用されたプログラムは、最初のウィンドウのリストボックスに反映されます。
Then press the Wrap button to use mDN Wrapper with the specified encoding for the selected program. The wrapped program is displayed in the list box in the first window.
To cancel the use of mDN Wrapper for a program, select the program in the list box and click the Unwrap button. The confirmation dialog box shown below is displayed. If this is correct, click the Unwrap button.
mDN Wrapper の適用が解除されると、そのプログラムは最初のウィンドウのリストボックスからも削除されます。
When use of mDN Wrapper is canceled for a program, that program is no longer displayed in the first window list box.
"Unwrap All" ボタンを押すことによって、現在適用されているすべてのプログラムに対して mDN Wrapper の適用を解除することもできます。
Use the Unwrap All button to cancel use of mDN Wrapper for all currently selected programs.
Click the "Log.." button to set a log level or log file. The dialog box shown below is displayed when this button is clicked.
ログレベルは次の中から選ぶことができます。
The following log levels can be selected.
These log levels are for logs output by the mDN library. Because the mDN Wrapper log can only be set to "on" or "off," "None" turns off the log entirely (however, it is "on" in all other cases).
ログファイルを指定することも可能です。デフォルトでは mDN Wrapper をインストールしたディレクトリの "mdn_wrapper.log" になっています。 "Browse.." ボタンを押せばブラウズ用のダイアログを利用して選択することができます。
A log file can also be specified. The default setting is mdn_wrapper log and is stored in the directory where mDN wrapper is installed. Click the Browse button to select the file from the Browse dialog box.
また、このダイアログではログファイルの内容を見ることと、ログファイルを削除することが可能です。それぞれ "View"、"Delete" ボタンを押してください。 "View" ボタンを押すとメモ帳が起動して、ログファイルの内容を表示します。
This dialog box can also be used to view and delete the log file. Use the View or Delete buttons to do this. When the View button is clicked, NotePad opens displaying the contents of the log file.
"OK" ボタンを押すとダイアログの設定が有効になります。設定を変えたくない場合には "Cancel" ボタンを押してください。
Click the OK button to confirm the dialog settings. Click the Cancel button when none of the settings are to be changed.
Click the "Advanced.." button to display the dialog box shown below. This is for experienced users; an appropriate default setting is provided for ordinary users to enable the change of basic parameters without the need for making detailed settings.
ダイアログ最上部のパネルでプログラムに対する mDN Wrapper の適用モードを指定することができます。選択できる値とその意味は次の通りです。
The appropriate mDN Wrapper mode can be set in the panel at the top of the dialog box. Settings and their meanings are listed below.
中段のパネルでは正規化の方式を設定することができます。左側のリストボックスに使用する正規化の名称が入っており、右側のリストボックスには使用可能な正規化の名称が入っています。右側のリストボックスから追加したい正規化を選択し、"Add" ボタンを押すと左側のリストボックスに追加されます。 また、左側のリストボックスで削除したい正規化を選択して "Remove" ボタンを押せば削除することができます。"Clear" ボタンを押すとすべての正規化が削除され、また "Reset" ボタンによりデフォルトの設定に戻すことができます。
Normalization schemes can be set in the center panel. The left box lists the names of selected normalization schemes, while the box on the right lists the names of available normalization schemes. Select a normalization scheme from the right box; click the Add button to add it to the list in the left box. You can also delete normalization schemes from the left list box, by selecting it and clicking the Remove button. The Clear button removes all normalization schemes, and the Reset button reinstates the default settings.
3段目のパネルでは DNS サーバ側のエンコーディング名を指定することができます。 デフォルトは "RACE" ですが、他のエンコーディングを使用したい場合には ここで指定してください。
The third panel is used to enter the encoding name of the DNS server. The default setting is RACE, but this panel allows you set the desired encoding.
以上の設定は "OK" ボタンを押すことにより有効になります。設定を変えずにダイアログを終了したい場合には "Cancel" ボタンを押してください。
The settings become effective by clicking the OK button. Click Cancel to close the dialog box without changing the settings.
ラッパーDLL は、元のWINSOCK のDLL のバージョンに強く依存します。 これは、非公開のエントリも含めてすべてのエントリを提供する必要があるためです。 このためWINSOCK DLL のバージョンが変わると、mDN Wrapper が動作しなくなる可能性があります。
Wrapper DLL is highly dependent on the original WINSOCK DLL version. This is because all entries including non-public entries must be supplied. As a result, mDN Wrapper may stop functioning when a different version of WINSOCK DLL is installed.
今回作成されたmDN Wrapper は、
It has been confirmed that the current version of mDN Wrapper operates with the following software.
で動作を確認しています。ただ、将来にわたって動作する保証はありません。
WinNT4.0 SP6a (WINSOCK 1.1 + 2.0) Win98 (WINSOCK 1.1 + 2.0) Win95 OSR2 (WINSOCK 1.1)
There is no guarantee, however, that it will function in the future.
Windows では、DNS だけではなく、WINSやLMHOSTS によってもドメイン名、ホスト名の解決が行なわれます。 mDN Wrapper を使った場合には、ドメイン名の変換が、これらの方式へのディスパッチを行なう場所よりも上位層で行なわれるので、これらのすべての方式について、ドメイン名、ホスト名の変換が行なわれることになります。 このため、Windows が、WINSやLMHOSTS を使っている場合には、予期しない問題が発生する可能性があります。 これについては、mDN Wrapper を使う場合には、名前解決にDNS だけを使用することをお勧めします。
In Windows, not only DNS but also WINS and LMHOSTS resolve domain names and host names. When mDN Wrapper is used, domain name conversion are not dispatched to these schemes but are performed at a higher level. As a result, when Windows uses WINS or LMHOSTS, unexpected results may occur. Thus when you use mDN Wrapper, we recommend that only DNS is used for name resolving.
WINSOCK 2.0 の名前解決API
The following are WINSOCK 2.0 name resolving APIs
は、ドメイン名以外でも使用できる汎用の名前解決用のAPI として定義されています。 現時点では、これらはもっぱらドメイン名の解決で使用されていますが、他の名前(例えばサービス名)の解決にも使用できることになっています。
WSALookupServiceBeginW WSALookupServiceNextW WSALookupServiceEnd
These are defined as a universal name resolving API that can be used for other than domain names. Currently, it is used only for resolving names, but it can also be used for resolving service names, for example.
mDN Wrapper は、名前の対象の如何にかかわらず、名前のエンコーディングを変換してしまうので、これらのAPI が、ドメイン名以外の解決に使われている場合には、問題を引き起こす可能性があります。
Because the mDN Wrapper converts encodings of any type of name, these APIs could cause problems if used for resolving names other than domain names.
Programs not using name resolving API
アプリケーションによっては、ドメイン名の解決にこれらのAPI を使用しないものもあります。例えば、'nslookup'は、これらのAPI を使用しないで、直接DNS サーバと通信してしまいます。このようなアプリケーションについては、mDN Wrapper は役に立ちません。
Some applications do not use these APIs for resolving domain names. For example, nslookup does not; instead, it communicates directly with the DNS server. mDN Wrapper cannot be used for such applications.
Applications tied to specific WINSOCK DLLs
アプリケーションによっては、標準のDLL サーチパスに従わないで、 特定のパスのDLL にバインドされているものがあります。 よく使われるプログラムの中では、Netscape Communicator がそうなっています。 このようなプログラムについては、標準のインストール/コンフィギュレーションでは mDN Wrapper を適用することはできません。
Some applications do not conform to standard DLL search paths, but are tied to a DLL of a specific path. An often used program, Netscape Communicator, is a case in point. mDN Wrapper cannot be added to such programs in a standard install or configuration.
このようなプログラムについて、どうしても mDN Wrapper を適用する必要があるなら、システムディレクトリへのインストールを行なうことができます。 ただし、このインストールは大変危険で、場合によってはシステムを再起動不能にしてしまう可能性もあります。
If mDN Wrapper must be added to this type of program, it can be installed under the system directory. However, such an installation is quite risky as it may sometimes make it impossible to restart.
これらの制限事項が問題になる場合には、代替手段として'dnsproxy'を使うこともできます。これは、DNS サーバとのトランザクションを中継するので、上で問題になったようなことを回避することができます。
dnsproxy can be used as an alternate approach to avoid such limitations. The above problems are avoided since dnsproxy operates between the DNS server and the transaction.
ただし、'dnsproxy'は、ラッパーよりも複雑な設定が必要ですし、また、呼び元のプログラムを特定することができませんので、プログラム固有のローカルエンコーディングを取り扱うことはできません。しかし、上記の制限事項が問題になるようなケースでは、ラッパーの代わりに使用するといいかもしれません。
However, dnsproxy requires a more complex setup procedure than Wrapper and cannot identify a calling program so it cannot handle the local encoding of specific programs. It is perhaps best used as an alternative to Wrapper to avoid the above limitations.
古いバージョンの mDN Wrapper がすでにインストールされているマシンに新しいバージョンをインストールする際には、次のことに気をつけてください。
Note the following when a new version of the software is to be installed in a machine containing an earlier version.
Uninstall old version prior to installation.
Before the most recent version is installed, uninstall the old version. Otherwise, a number of files will not be updated and the old version will remain in effect even though the latest version has been installed.
To delete, open the Control Panel and select mDN Wrapper in Add/Remove Applications.
If you made the mistake of installing the new version without first removing the old version, first uninstall, and then reinstall, the software.
Re-wrapping all files
mDN Wrapper copies a DLL file to the directory that contains programs that can be wrapped by mDN Wrapper.
The copied DLL is not automatically updated to the latest version when a new version of the software is installed preventing use of the latest version. Therefore, after installation, unwrap all applications wrapped using mDN Wrapper and then wrap them again. The easiest way to do this is to click the Unwrap All button in the configuration program.