DNS ISC BIND with Internationalized domain name supported
Get the ISC BIND DNS source from
http://www.isc.org/downloads/
LIBICONV
Only need on Windows
http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio
IDN kit
Get the IDN kit from BIND source, i.e bind-9.10.4-P1/contrib/idn
Unix
./configure --with-idn --prefix=/opt/idn/idnkit-1.0/linux-gcc3
If you want build 64-bit version, you have to edit these files
vi lib/Makefile
vi tools/idnconv/Makefile
# If use GCC
CC = gcc -m64
# If use CC on Solaris
CC = cc -m64
make clean && make && make install
Windows
Copy all built ICONV files (iconv.dll, iconv.lib, iconv.h) to
C:/opt/bind-9.10.4-P1/contrib/idn/idnkit-1.0/idnkit-1.0-src/win
# 64-bit
# Open the VS 2010 x64
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" amd64
cd C:/opt/bind-9.10.4-P1/contrib/idn/idnkit-1.0/idnkit-1.0-src
nmake -f make.wnt
Get these files in C:/opt/bind-9.10.4-P1/contrib/idn/idnkit-1.0/idnkit-1.0-src/lib
idnkit.dll
idnkit.lib
DNS
Unix
sh ../configure --prefix=/opt/mydns/bind910/bind-9.10.4-P1/linux/bind9101p1
--enable-largefile
--enable-fixed-rrset
--enable-filter-aaaa
--enable-threads
--with-openssl=$openssl_dir
--with-gssapi=$krb_dir
--with-libxml2=$libxml2_dir
--with-idn=/opt/idn/idnkit-1.0/linux-gcc3
make clean && make
When running, need the libidnkit.so.1
export LD_LIBRARY_PATH=/opt/idn/idnkit-1.0/linux-gcc3/lib:$LD_LIBRARY_PATH
export LC_ALL= NAME_OF_LANGUAGE
en_US.UTF-8
en_CA.UTF-8
es_MX.UTF-8
fr_CA.UTF-8
dig an-phú.vn
host an-phú.vn
nslookup an-phú.vn
Windows
Edit the files in
bind-9.10.4-P1/bin/dig/win32
dig.vcxproj
host.vcxproj
nslookup.vcxproj
Add the idnkit.lib into ItemDefinitionGroup
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AdditionalDependencies>
ws2_32.lib;Release/dighost.lib;
../../../lib/isc/win32/Release/libisc.lib;
../../../lib/isccfg/win32/Release/libisccfg.lib;
../../../lib/dns/win32/Release/libdns.lib;
../../../lib/bind9/win32/Release/libbind9.lib;
../../../lib/lwres/win32/Release/liblwres.lib;
idnkit.lib;
%(AdditionalDependencies)
</AdditionalDependencies>
</ItemDefinitionGroup>
Include the IND kit INCLUDE and LIB directories into project.
Not on Windows
bind-9.10.4-P1/bin/dig/dighost.c
/* Create configuration context. */
/* Tuan Vo
* idn_nameinit(int load_file)
* If load_file is 0, this will set the defaults behavior without the
* configuration file. Otherwise, loading of the configuration file occurs.
* If I set load_file is 1 as ISC BIND do,
* it will require the idnkit confiuration file (idnkit.conf)
* when running dig/host/nslookup on Windows.
* We could not ask customer to install the idnkit so I change it to default behavior on Windows.
*/
#ifdef WINNT /* Tuan Vo */
r = idn_nameinit(0);
#else
r = idn_nameinit(1);
#endif /* WINNT */
if (r != idn_success)