How to convert IDN to xn form (puny code)

Hi all,

I want to convert the International Domain Names (IDN), which are in native language such as Japanese fonts, to xn-- form also known as Puny code.

for e.g. when you type the following URL into the address bar in IE7 or Mozilla firefox :東京観光.com

Then it gets converted to xn-- form.

Please send me the java code for implementing this functionality.

Thanks in advance.

[439 byte] By [Prashant001a] at [2007-10-3 5:18:33]
# 1
Hello,IDN feature will be added in the upcoming Java SE 6. http://download.java.net/jdk6/docs/api/java/net/IDN.htmlYou can try it with the latest Java SE 6 build drop, which is available at:https://jdk6.dev.java.net/HTH,Naoto
naotoa at 2007-7-14 23:25:25 > top of Java-index,Desktop,I18N...
# 2
Hi,Thanks for the reply, but the problem is that the whole project is built on jdk-5 & tomcat-5 and so we can't use jdk6. Is there any alternate solution for implementing the same ?Regards
Prashant001a at 2007-7-14 23:25:25 > top of Java-index,Desktop,I18N...
# 3
http://icu.sourceforge.net/apiref/icu4j/
one_danea at 2007-7-14 23:25:25 > top of Java-index,Desktop,I18N...
# 4
Meant to paste this: http://icu.sourceforge.net/apiref/icu4j/com/ibm/icu/text/IDNA.html
one_danea at 2007-7-14 23:25:25 > top of Java-index,Desktop,I18N...
# 5
Hello,Here's an example in Delphi. I think it will be very easy for you to convert that into Java code: http://www.enyem.com/wiki/index.php/IDN_conversion_(Delphi)
GajoCsaba22a at 2007-7-14 23:25:25 > top of Java-index,Desktop,I18N...