Simple DNS Plus
menubar Skip Navigation Links
Home
Product Details
Download
Purchase
Support
Company
Search
menubar

Knowledge Base
Article ID:
1190
Last updated:
06 Jun 2009
Print Print
E-mail E-Mail
Comment Comment
Punycode / IDN library for .NET 2.0

The "Simple DNS Plus IDN library", which powers our online IDN conversion tool is now available as a free .NET 2.0 library.

This can be used in any type of .NET 2.0 (or later) project including desktop applications and ASP.NET web-sites.

For desktop applications, you simply add a refrence to the library DLL file, and when distributing your application, install the DLL file to the same directory as your EXE file.

For ASP.NET 2.0 web-sites, simply add the library DLL file to the BIN directory.
Make sure to use UTF-8 encoding on any ASP.NET pages where you display or input domains names with international characters. UTF-8 is the default encoding under ASP.NET, so you should not need to change anything unless you for some reason are using a different encoding.

The library only has two functions; "Encode" (converts from domain name with international characters to punycode)  and "Decode" (converts from punycode to domain name with international characters).

Each of the functions take one string parameter and returns a string.

For example:

s = SimpleDNSPlus.IDNLib.Encode("東京.net")    [returns "xn--1lqs71d.net"]

s = SimpleDNSPlus.IDNLib.Decode("xn--1lqs71d.net")     [returns "東京.net"]

You can download the library (v. 1.0.2) from:
http://www.simpledns.com/outbox/idnlib.dll

For some IDN test data, see http://idntools.net/idnsales.php

NOTE: The functionality of the IDN library is included in our Simple DNS Plus API for .NET/COM
So if you are already using that API in your project, you don't need this library. 

LICENSE TERMS:
You are free to use this library, include with other products and services, and distribute it through any media in any way you like.
We would of course appreciate a link back to this page page or http://www.simpledns.com 

RELEASE NOTES:
- Version 1.0.2 June 6th 2009: Fixed strong-name issue.
- Version 1.0.1 May 26th 2009: Compiled with newer tools and strong-name signed.
- Version 1.0.0 December 20th 2006: First release.

REFERENCE:
For more information, please see the following knowledge base article:

KB Article How to use domain names with international characters (IDN) in Simple DNS Plus and web-servers




Comments: RSS

21 Jul 2008 17:51 GMT - by mohammad jamal:
what about Microsoft Visual Basic 6.0

22 Jul 2008 09:36 GMT - by Jesper - JH Software:
We have some IDN code for classic ASP (VBScript) at http://www.simpledns.com/addons.aspx
You should be able to use this almost directly in a VB6 project.
Or you can use the "Simple DNS Plus API for .NET/COM" which also has this functionality by referencing this from your VB6 project - this does however require .NET 2.0 on the client machine.

23 Jul 2008 09:48 GMT - by mohammad jamal:
Thank you very much
The problems were solved
Thank you once again

01 Oct 2008 14:40 GMT - by Mat:
Hi there,
Nice work.
Is it possible that you strong-name the assembly so i can put the dll in the gac or release the source code so i could sign it myself?
Thanks a lot for your work,
Mat :)

21 May 2009 09:45 GMT - by El Barto:
Nice library.
There is one major drawback to this library. If you use this library and want to use control adapters, it won't compile. It's easy to reproduce. Download the CSS friendly control adapters. Open the solution en compile the website. No problem here, but when you add a reference to idnlib.dll and try to compile you get an OutOfMemoryException. If you comment out the ControlAdapters section from the .browser file in the App_Browsers folder it compiles again. http://cssfriendly.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=2159

26 May 2009 13:45 GMT - by Jesper - JH Software:
Thanks very much for your feedback.
Just uploaded v. 1.0.1 (download from link above).
This version is compiled with newer tools which should resolve the problem reported by El Barto, and it is strong-name signed as requested by Mat.

08 Jan 2010 11:58 GMT - by Stephen:
Thanks for posting this put have added dll to bin and addeded reference in .net web built in c# but get error "dll does not exist in current context" in code behind when build website, so it will not compile. It is file based project. Stephen



Copyright © 1999-2010 JH Software ApS. All Rights Reserved.
E-mail questions to
Site Map | Terms of Use | Privacy Statement | Return Policy | About Us
help index